
2011-2012 Microchip Technology Inc.
Preliminary
DS70657E-page 225
dsPIC33EPXXXGP50X, dsPIC33EPXXXMC20X/50X, AND PIC24EPXXXGP/MC20X
16.0 HIGH-SPEED PWM MODULE
(dsPIC33EPXXXMC20X/50X
and PIC24EPXXXMC20X
DEVICES ONLY)
The
dsPIC33EPXXXMC20X/50X
and
PIC24EPXXXMC20X devices support a dedicated
Pulse-Width Modulation (PWM) module with up to 6
outputs.
The High-Speed PWM module consists of the following
major features:
Three PWM generators
Two PWM outputs per PWM generator
Individual period and duty cycle for each PWM pair
Duty cycle, dead time, phase shift and frequency
resolution of 8.32 ns
Independent Fault and current-limit inputs for six
PWM outputs
Redundant output
Center-Aligned PWM mode
Output override control
Chop mode (also known as Gated mode)
Special Event Trigger
Prescaler for input clock
PWMxL and PWMxH output pin swapping
Independent PWM frequency, duty cycle and
phase shift changes for each PWM generator
Dead-time compensation
Enhanced Leading-Edge Blanking (LEB)
functionality
Frequency resolution enhancement
PWM capture functionality
The High-Speed PWM module contains up to three
PWM generators. Each PWM generator provides two
PWM outputs: PWMxH and PWMxL
. The master time
base generator provides a synchronous signal as a
common time base to synchronize the various PWM
outputs. The individual PWM outputs are available on
the output pins of the device. The input Fault signals
and current-limit signals, when enabled, can monitor
and protect the system by placing the PWM outputs
into a known “safe” state.
Each PWM can generate a trigger to the ADC module
to sample the analog signal at a specific instance dur-
ing the PWM period. In addition, the High-Speed PWM
module also generates a Special Event Trigger to the
ADC module based on either of the two master time
bases.
The High-Speed PWM module can synchronize itself
with an external signal or can act as a synchronizing
source to any external device. The SYNCI1 input pin
that utilizes PPS, can synchronize the High-Speed
PWM module with an external signal. The SYNCO1 pin
is an output pin that provides a synchronous signal to
an external device.
Figure 16-1 illustrates an architectural overview of the
High-Speed PWM module and its interconnection with
the CPU and other peripherals.
16.1
PWM Faults
The PWM module incorporates multiple external Fault
inputs to include FLT1 and FLT2, which are re-
mappable using the PPS feature, FLT3 and FLT4,
which are available only on the larger 44-pin and 64-pin
packages, and FLT32, which has been implemented
with Class B safety features, and is available on a fixed
pin
on
all
dsPIC33EPXXXMC20X/50X
and
PIC24EPXXXMC20X devices.
These faults provide a safe and reliable way to safely
shut down the PWM outputs when the Fault input is
asserted.
16.1.1
PWM FAULTS AT RESET
During any reset event, the PWM module maintains
ownership of the Class B fault FLT32. At reset, this fault
is enabled in latched mode to guarantee the fail-safe
power-up of the application. The application software
must clear the PWM fault before enabling the High-
Speed Motor Control PWM module. To clear the fault
condition, the FLT32 pin must first be pulled low
externally or the internal pull down resistor in the
CNPDx register can be enabled.
Note 1: This data sheet summarizes the features
of
the
dsPIC33EPXXXGP50X,
dsPIC33EPXXXMC20X/50X,
and
PIC24EPXXXGP/MC20X
families
of
devices. It is not intended to be a
comprehensive reference source. To
complement the information in this data
sheet, refer to Section 14. “High-Speed
PWM” (DS70645) of the “dsPIC33E/
PIC24E Family Reference Manual”,
2: Some registers and associated bits
described in this section may not be
available on all devices. Refer to
this data sheet for device-specific register
and bit information.
Note:
In Edge-Aligned PWM mode, the duty
cycle,
dead-time,
phase
shift
and
frequency resolution are 8.32 ns.
Note:
The Fault mode may be changed using
the FLTMOD<1:0> bits (FCLCON<1:0>)
regardless of the state of FLT32.