
M0A21/M0A23 Series
May 06, 2022
Page
364
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
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 order of the
transferred data (falling edge captured is first or rising edge captured first). The complement pair
channels share a PDMA channel. Therefore, a selection bit CHSELn_m (CHSEL0_1
(PWM_PDMACTL[4]), CHSEL2_3 (PWM_PDMACTL[12]) and CHSEL4_5 (PWM_PDMACTL[20])) bit
is used to decide either channel n or channel m can be serviced by the PDMA channel.
Figure 6.10-36 is capture PDMA waveform. In this case, the CHSEL0_1 (PWM_PDMACTL[4]) bit is set
to 0. Hence the PDMA will service channel 0 for the capture data transfer. CAPMOD0_1
(PWM_PDMACTL[2:1]) bits are set to 3. That means both of the rising and falling edge captured data
will be transferred to the memory. The CAPORD0_1 (PWM_PDMACTL[3]) is set to 1, so the rising edge
data will be the first data to transfer and following is the falling edge data to transfer. As shown in Figure
6.10-36, the last assertions of the CAPRIF0 CRLIF0 and CAPFIF0 CFLIF0 signal have some overlap.
The PWM_RCAPDAT0 value 11 will be loaded to PWM_PDMACAP0_1 register to wait for transfer but
not the PWM_FCAPDAT0 value 6. The PWM_PDMACAP0_1 register saves the data which will be
transferred to the memory by PDMA. The HWDATA in Figure 6.10-36 denotes the data which are being
transferred by PDMA.
14
15
PWM_FCAPDAT0
15
PWM_RCAPDAT0
CRLIF0
CFLIF0
3
11
6
d
14
15
PWM_PDMACAP0_1
11
d
3
3
PWM_request
PDMA_ack
14
15
11
3
HWDATA
CHEN0_1
Setting:
CAPMOD0_1 (PWM_PDMACTL[2:1]) = 3
CAPORD0_1 (PWM_PDMACTLL[3]) = 1
CHSEL0_1 (PWM_PDMACTL[4]) = 0
Figure 6.10-36 Capture PDMA Operation Waveform of Channel 0