
Mini57
Apr. 06, 2017
Page 290 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
BPWM Comparator Register0-1 (BPWM_CMPDAT0-1)
Register
Offset
R/W
Description
Reset Value
BPWM_CMPD
AT0
0x10
R/W
Basic PWM Comparator Register 0
0x0000_0000
BPWM_CMPD
AT1
0x1C R/W
Basic PWM Comparator Register 1
0x0000_0000
31
30
29
28
27
26
25
24
Reserved
23
22
21
20
19
18
17
16
Reserved
15
14
13
12
11
10
9
8
CMP
7
6
5
4
3
2
1
0
CMP
Bits
Description
[31:16]
Reserved
Reserved.
[15:0]
CMP
PWM Comparator Register
CMP determines the PWM duty.
PWM frequency = BPWM_CLK/[(p1)*(clock divider)*(1)].
For Edge-aligned type:
PWM frequency = BPWM_CLK/[(p1)*(clock divider)*(1)].
Duty ratio = (CMP+1)/(1).
CMP >= PERIOD: PWM output is always high.
CMP < PERIOD: PWM low width = (PERIOD-CMP) unit; PWM high width =
(CMP+1) unit.
CMP = 0: PWM low width = (PERIOD) unit; PWM high width = 1 unit.
For Center-aligned type:
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; PWM high width
= (2 x CMP) + 1 unit.
CMP = 0: PWM low width = 2 x 1 unit; PWM high width = 1 unit.
(Unit = one PWM clock cycle).
Note:
Any write to PERIOD will take effect in next PWM cycle.