dsPIC30F Family Reference Manual
DS70062C-page 15-22 © 2004 Microchip Technology Inc.
15.4.3 Single Event PWM Operation
The PWM module will produce single pulse outputs when the PWM time base is configured for
the single event mode (PTMOD<1:0> = 01). This mode of operation is useful for driving certain
types of electronically commutated motors. In particular, this mode is useful for high-speed SR
motor operation. Only edge-aligned outputs may be produced in the Single Event mode.
In Single Event mode, the PWM I/O pin(s) are driven to the active state when the PTEN bit is
set. When a match with a duty cycle register occurs, the PWM I/O pin is driven to the inactive
state. When a match with the PTPER register occurs, the PTMR register is cleared, all active
PWM I/O pins are driven to the inactive state, the PTEN bit is cleared, and an interrupt is
generated. Operation of the PWM module will stop until the PTEN is set again in software.
Figure 15-7: Single Event PWM Operation
PDC1
PTPER
PTEN bit set by
software
PTEN bit cleared by
hardware
PWMIF
PWMIF cleared in software
PDC2
PWM2H
PWM1H
PTEN