
NUC126
Aug. 08, 2018
Page
448
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
Note:
n denotes 0 to 5
8
7
6
5
4
3
2
1
8
7
6
5
PWM counter
1
7
Capture Input
PWM_FCAPDATn
5
PWM_RCAPDATn
Capture interrupt
CAPFIENn
CAPRIENn
CAPINENn
Clear by S/W
CFLIFn
CRLIFn
Reload (PERIOD = 8)
Reload
Clear by S/W
Falling Latch
Falling Latch
Rising Latch
FCRLDENn
RCRLDENn
Figure 6.13-42 Capture Operation Waveform
The capture pulse width can be calculated according to the following formula:
For the negative pulse case, the channel low pulse width is calculated as (PWM_PERIODn + 1 -
PWM_RCAPDATn). In Figure 6.13-42, the low pulse width is 8+1-5 = 4
For the positive pulse case, the channel high pulse width is calculated as (PWM_PERIODn + 1 -
PWM_FCAPDATn). In Figure 6.13-42, the high pulse width is 8+1-7 = 2
6.13.5.29 Capture PDMA Function
The PWM module supports the PDMA transfer function when operating in the capture mode. When
the corresponding PDMA enable bit CHENn_m (CHEN0_1 at PWM_PDMACTL[0], CHEN2_3 at
PWM_PDMACTL[8] and CHEN4_5 at PWM_PDMACTL[16], where n and m denote complement pair
channels) is set, the capture module will issue a request to PDMA controller when the preceding
capture event has happened. The PDMA controller will issue an acknowledgement to the capture
module after it has read back the CAPBUF (PWM_PDMACAPn_m[15:0], n, m denotes complement
pair channels) register in the capture module and has sent the register value to the memory. By setting
CAPMODn_m (CAPMOD0_1 at PWM_PDMACTL[2:1], CAPMOD2_3 at PWM_PDMACTL[10:9] and
CAPMOD4_5 at PWM_PDMACTL[18:17]) bits, the PDMA can transfer the rising edge captured data
or falling edge captured data or both of them to the memory. When using the PDMA to transfer both of
the falling and rising edge data, remember to set CAPORDn_m (CAPORD0_1 at PWM_PDMACTL[3],
CAPORD2_3 at PWM_PDMACTL[11] and CAPORD4_5 at PWM_PDMACTL[19]) bit to decide the