UG-498
ADuCM320 Hardware Reference Manual
Rev. C | Page 176 of 196
PWM
PWM FEATURES
•
8-channel PWM interface
•
H-bridge mode supported on 2 pairs
PWM OVERVIEW
The
integrates an 8-channel PWM interface. Eight channels are grouped as three pairs (0 to 3). The first two pairs of PWM
outputs (PWM0, PWM1, PWM2, and PWM3) can be configured in standard mode or to drive an H-bridge. Pair 2 and Pair 3 can be
configured in standard mode only. The PWM pairs and modes are summarized in Table 264.
Table 264. PWM Channel Grouping
Port Name
Description
PWM Mode Available
PWM0
High-side PWM output for Pair 0
H-bridge and standard
PWM1
Low-side PWM output for Pair 0
H-bridge and standard
PWM2
High-side PWM output for Pair 1
H-bridge and standard
PWM3
Low-side PWM output for Pair 1
H-bridge and standard
PWM4
High-side PWM output for Pair 2
Standard
PWM5
Low-side PWM output for Pair 2
Standard
PWM6
High-side PWM output for Pair 3
Standard
PWM7
Low-side PWM output for Pair 3
Standard
On power-up, the PWM outputs default to H-bridge mode for Pair 0 and Pair 1. In the standard mode, the user has control over the
period of each pair of outputs and over the duty cycle of each individual output.
In the event of external fault conditions, a falling edge on the PWM
TRIP
pin provides an instantaneous shutdown of the PWM controller.
All PWM outputs are placed in the off state, that is, in low state for the low side and high state for the high side, and a PWM
TRIP
interrupt
can be generated.
PWM OPERATION
The PWM clock is selectable via PWMCON0 with one of the following values: HCLK divided by 2, 4, 8, 16, 32, 64, 128, or 256.
In all modes, the PWMxCOMx MMRs control the point at which the PWM output changes state. An example is shown in Figure 32.
Each pair has an associated counter. The length of the PWM period is defined by PWMxLEN.
The PWM waveforms are set by the count value of the 16-bit timer and the compare register contents.
An example for PWM Pair 0 (Port PWM0 and Port PWM1) is
•
The low-side waveform, PWM1, goes high when the timer count reaches PWM0LEN, and it goes low when the timer count reaches
the value held in PWM0COM2 or when the high-side waveform PWM0 goes low.
•
The high-side waveform, PWM0, goes high when the timer count reaches the value held in PWM0COM0, and it goes low when the
timer count reaches the value held in PWM0COM1.