
Mini57
Apr. 06, 2017
Page 279 of 475
Rev.1.00
MINI5
7
S
E
RI
E
S
TECH
NIC
A
L R
E
F
E
RE
N
CE
MA
N
UA
L
configured in an Up/Down Counting mode. The PWM counter will start counting-up from 0 to
match the value of CMP (BPWM_CMPDAT0-1[15:0]); this will cause the toggling of the PWMn
generator output to low. The counter will continue counting to match with the PERIOD
(BPWM_PERIOD0-1[15:0]) . Upon reaching this states counter is configured automatically to
down counting, when PWM counter matches the CMP value again the PWMn generator output
toggles to high. Once the PWM counter underflows it will update the PERIOD of PWM counter
register and CMP of BPWM comparator register0-1 with CNTMODEn = 1, n= 0, 1.
In Center-aligned type, the PWM period interrupt is requested at down-counter underflow if
PINTTYPE (BPWM_INTEN [16]) =0, i.e. at start (end) of each PWM cycle or at up-counter
matching with PERIOD if PINTTYPE (BPWM_INTEN [16])
=1, i.e. at center point of PWM cycle.
PWM frequency = BPWM_CLK/[(p1)*(clock divider)*2(1)].
Duty ratio = [(2 x CMP) + 1]/[2 x (1)]
CMP > PERIOD: PWM output is always high
CMP <= PERIOD: PWM low width= 2 x (PERIOD-CMP) + 1 unit[1]; PWM high width =
(2 x CMP) + 1 unit
CMP = 0: PWM low width = 2 x 1 unit; PWM high width = 1 unit
PERIOD (new)
(BPWM_PERIODn[15:0])
CMP (new)
(BPWM_CMPDATn[15:0])
New Duty
Cycle
PWM
period
New CMP is written
New PERIOD is written
If 16-bit PWM up/down counter underflows
1. Update new comparator register: CMP(BPWM_CMPDATn[15:0]) if CNTMODEn = 1
2. Update new counter register: PERIOD(BPWM_PERIODn[15:0]) if CNTMODEn = 1
PWMn generator ouput
16-bit
PWM
counter
PWM
period
PWM period
Note: n= 0,1 denote BPWM 0/ 1
PERIOD (old)
(BPWM_PERIODn[15:0])
CMP (old)
(BPWM_CMPDATn[15:0])
Figure 6.9-6 Center-aligned Type Output Waveform