NuMicro® NUC029LEE/NUC029SEE
32-bit Arm
®
Cortex
®
-M0 Microcontroller
Aug, 2018
Page
261
of
497
Rev 1.00
N
U
MICRO
®
N
UC02
9L
E
E
/N
UC029
S
E
E
T
E
CHN
ICA
L R
E
F
E
R
E
NC
E
M
A
NU
A
L
the corresponding GPIO pins must be configured as capture function (POE disabled and
CAPENR enabled) for the corresponding capture channel.
8
7
6
5
4
3
2
1
8
7
6
5
PWM Counter
1
7
Capture Input n
CFLRn
5
CRLRn
Set by H/W
Clear by S/W
CAPIFn
CFL_IEn
CRL_IEn
CAPCHnEN
Set by H/W
Clear by S/W
CFLRIn
Set by H/W
Clear by S/W
Note: n=0~3
CRLRIn
Reload
Reload
(If CNRn = 8)
No reload due to
no CAPIFn
Figure 6.9-16 Capture Operation Timing
In this case, the CNR is 8:
The PWM counter will be reloaded with CNRn when a capture interrupt flag (CAPIFn)
is set.
The channel low pulse width is (CNR + 1 - CRLR).
The channel high pulse width is (CNR + 1 - CFLR).
6.9.5.9 PWM-Timer Interrupt Architecture
There are eight PWM interrupts, PWM0_INT~PWM5_INT, which are divided into PWMA_INT and
PWMB_INT for Advanced Interrupt Controller (AIC). PWM 0 and Capture 0 share one interrupt,
PWM1 and Capture 1 share the same interrupt and so on. Therefore, PWM function and Capture
function in the same channel cannot be used at the same time. Figure 6.9-17 and Figure 6.9-18
demonstrates the architecture of PWM-Timer interrupts.