UG-549
ADuCM310 Hardware Reference Manual
Rev. C | Page 180 of 192
H-Bridge Mode
In H-bridge mode, the two pairs of frequency and duty cycle are controlled by PWM0COM0, PWM0COM1, and PWM0LEN. For
H-bridge mode, HMODE = 1 (PWMCON0[1] = 1). The HMODE bit also works with PWMCON0[5:2] for H-bridge mode. Note that only
PWM0 to PWM3 participate in H-bridge mode; other outputs (PWM4 and PWM5) do not and continue to generate standard mode output.
M
PWM0
P CHANNEL
N CHANNEL
G
S
D
PWM1
PWM2
PWM3
+
–
1
1461-
031
Figure 33. Example H-Bridge Configuration
Table 272. PWM Output in H-Bridge Mode
PWM Control Bits
PWM Outputs
ENA
PWMCON0[9]
POINV
PWMCON0[5]
HOFF
PWMCON0[4]
DIR
PWMCON0[2] PWM0
PWM1
PWM2 PWM3 State of Motor
0
X
0
X
1
(Disable)
1
(Enable)
1
1
Brake
X
X
1
X
1
(Disable)
0
(Disable)
1
0
Free run
1
0
0
0
0
(Enable)
0
(Disable)
HS
LS
Move controlled by LS
on PWM2
1
0
0
1
HS
LS
0
0
Move controlled by HS
on PWM0
1
1
0
0
LS
HS
1
1
Move controlled by LS
on PWM0
1
1
0
1
1
(Disable)
1
(Enable)
LS
HS
Move controlled by HS
on PWM2
1
HS is high side, LS is low side, HS is inverse of high side, and LS is inverse of low side, as programmed in the PWM0 registers.
PWM INTERRUPT GENERATION
PWM Trip Function Interrupt
When the PWM trip function is enabled (TRIPEN, PWMCON1[6]) and the PWM trip input signal goes low (falling edge), the PWM
peripheral disables itself (PWMCON0[0] = 0). It also generates the PWM trip interrupt. The interrupt is cleared by setting PWMCLRI[4].
PWM Output Pairs Interrupts
In standard mode, each PWM pair has a dedicated interrupt: IRQPWM0, IRQPWM1, IRQPWM2, IRQPWM3. In H-bridge mode, only
IRQPWM0 is available.
When the interrupt generation is enabled (PWMCON0[10]) and the counter value for Pair 0 changes from PWM0LEN to 0, it also
generates the IRQPWM0 interrupt. The interrupt is cleared by setting PWMCLRI[0].
When the interrupt generation is enabled (PWMCON0[10]) and the counter value for Pair 1 changes from PWM1LEN to 0, it also
generates the IRQPWM1 interrupt. The interrupt is cleared by setting PWMCLRI[1].
When the interrupt generation is enabled (PWMCON0[10]) and the counter value for Pair 2 changes from PWM2LEN to 0, it also
generates the IRQPWM2 interrupt. The interrupt is cleared by setting PWMCLRI[2].
When the interrupt generation is enabled (PWMCON0[10]) and the counter value for Pair 3 changes from PWM3LEN to 0, it also
generates the IRQPWM3 interrupt. The interrupt is cleared by setting PWMCLRI[3].