ADuCM310 Hardware Reference Manual
UG-549
Rev. C | Page 179 of 192
Table 270 lists equations for the period and duration for both the outputs of a PWM channel. Note that t
UCLK/DIV
is the PWM clock
frequency selected by CLKCON1[2:0] and CLKSYSDIV[0], and N
PRESCALE
is the prescalar value as determined by PWMCON0[8:6].
Table 270. PWM Equations
PWM
Period
Low Duration
Low Side (PWM1)
t
UCLK/DIV
× (P 1) × N
PRESCALE
.
If (PWMCOM2 < PWMCOM1), t
UCLK
/DIV
× (PWM0LEN − PWM0COM2) × N
PRESCALE
.
Else, t
UCLK
× (PWM0LEN − PWM0COM1) × N
PRESCALE
.
High Side (PWM0)
t
UCLK/DIV
× (P 1) × N
PRESCALE
.
t
UCLK/DIV
× (PWM0COM0 − PWM0COM1) × N
PRESCALE
.
Standard Mode
In standard mode, each pair is individually controlled by a selection of registers, as shown in Table 271.
Table 271. Compare Register Descriptions in Standard Mode (Base Address: 0x40024000)
Name
Offset
Description
PWM0COM0
0x010
PWM0 output goes high when the PWM timer reaches the count value stored in this register.
PWM0COM1
0x014
PWM0 output goes low when the PWM timer reaches the count value stored in this register.
PWM0COM2
0x018
PWM1 output goes low when the PWM timer reaches the count value stored in this register.
PWM0LEN
0x01C
PWM1 output goes high when the PWM timer reaches the count value stored in this register.
PWM1COM0
0x020
PWM2 output goes high when the PWM timer reaches the count value stored in this register.
PWM1COM1
0x024
PWM2 output goes low when the PWM timer reaches the count value stored in this register.
PWM1COM2
0x028
PWM3 output goes low when the PWM timer reaches the count value stored in this register.
PWM1LEN
0x02C
PWM3 output goes high when the PWM timer reaches the count value stored in this register.
PWM2COM0
0x030
PWM4 output goes high when the PWM timer reaches the count value stored in this register.
PWM2COM1
0x034
PWM4 output goes low when the PWM timer reaches the count value stored in this register.
PWM2COM2
0x038
PWM5 output goes low when the PWM timer reaches the count value stored in this register.
PWM2LEN
0x03C
PWM5 output goes high when the PWM timer reaches the count value stored in this register.
PWM3COM0
0x040
PWM6 output goes high when the PWM timer reaches the count value stored in this register.
PWM3COM1
0x044
PWM6 output goes low when the PWM timer reaches the count value stored in this register.
PWM3COM2
0x048
PWM7 output goes low when the PWM timer reaches the count value stored in this register.
PWM3LEN
0x04C
PWM7 output goes high when the PWM timer reaches the count value stored in this register.
Figure 32. PWM Output on PWM0 and PWM1 Pins; PWM0 is Channel 2