
NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 348 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
5.12.3 Block Diagram
The following figure describes the architecture of one PWM pair.
1
1/2
1/4
1/8
1/16
PCLK
8-bit
Prescaler
Control
logic
5
-1
M
u
x
5
-1
M
u
x
PWM1_CNR
Control
logic
PWM0_CLK
PWM1_CMR
PWM0_CNR PWM0_CMR
Dead-Zone
Generator 0
DZEN01
(PWM_PCR[4])
DZEN01
(PWM_PCR[4])
CH0_INV
(PWM_PCR[2])
CH1_INV
(PWM_PCR[10])
1
1
0
0
1
0
1
0
CLKSEL1
(PWM_CSR[6:4])
CLKSEL0
(PWM_CSR[2:0])
Figure 5.12-1 Two channels of PWM in one pair
5.12.4 Basic Configuration
The PWM pin functions are configured in PA_H_MFP, PB_L_MFP, PC_H_MFP, PD_H_MFP, and
PH_L_MFP registers. The clock enable of PWM function is configured in PCLKEN1[27].
5.12.5 Functional Description
PWM Timer Operation
5.12.5.1
The PWM period and duty control are decided by register CNR (PWM_CNR[15:0]) and CMR
(PWM_CMR[15:0]). The PWM-timer timing operation is shown in
Error! Reference source not
found.
. The pulse width modulation follows the formula below and the legend of PWM-Timer
Comparator is shown in Figure 5.12-2.
PWM frequency = PCLK/(p1)*(clock divider)/(CNR+1); depending on selected PWM channel.
Duty ratio = (CMR+1)/(CNR+1).
CMR >= CNR: PWM output is always high.
CMR < CNR: PWM low width = (CNR - CMR) unit1; PWM high width = (CMR+1) unit.
If CMR = 0: PWM low width = (CNR) unit; PWM high width = 1 unit.