
M0A21/M0A23 Series
May 06, 2022
Page
361
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
1
6
t
o
1
M
U
X
2h
3h
0h
1h
6h
7h
4h
5h
Fh
PWM_CH1 down-count compared point
PWM_CH0 zero point
PWM_CH0 period point
PWM_CH0 up-count compared point
PWM_CH0 down-count compared point
PWM_CH1 up-count compared point
PWM Trigger 0/
PWM Trigger 1
Reserved
9h
Ah
8h
Dh
Eh
Bh
Ch
TRGSEL0 (PWM_ADCTS0[3:0])/
TRGSEL1 (PWM_ADCTS0[11:8]
TRGEN0 (PWM_ADCTS0[7])/
TRGEN1 (PWM_ADCTS0[15])
PWM_CH0 period or zero point
ADC
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Figure 6.10-32 PWMx_CH0 and PWMx_CH1 Pair Trigger ADC Block Diagram
PWM_CMPDATn
PWM_PERIODn
zero point trigger
PWM_CNTn
4
7
3
2
0
1
2
3
4
3
1
2
0
1
2
3
4
3
1
2
0
5
6
7
6
4
5
1
2
3
4
period point trigger
CMPU point trigger
CMPD point trigger
Figure 6.10-33 PWM Trigger ADC in Up-Down Counter Type Timing Waveform
6.10.5.24 Capture Operation
The channels of the capture input and the PWM output share the same pin and counter. The counter
can operate in up or down counter type. The capture function will always latch the PWM counter to the
RCAPDATn (PWM_RCAPDATn[15:0]) bits or the FCAPDATn (PWM_FCAPDATn[15:0]) bits, if the input
channel has a rising transition or a falling transition, respectively. The capture function will also generate
an interrupt CAP_INT (using PWM_INT vector) if the rising or falling latch occurs and the corresponding
channel n
’s rising or falling interrupt enable bits are set, where the CAPRIENn (PWM_CAPIEN[5:0]) bit
is for the rising edge and the CAPFIENn (PWM_CAPIEN[13:8]) bit is for the falling edge. When rising
or falling latch occurs, the corresponding PWM counter may be reloaded with the value of
PWM_PERIODn register, depending on the setting of RCRLDENn or FCRLDENn bits (where
RCRLDENn and FCRLDENn are located at PWM_CAPCTL[21:16] and PWM_CAPCTL[29:24],
respectively). Note that the corresponding GPIO pins must be configured as the capture function by
enable the CAPINENn (PWM_CAPINEN[5:0]) bits for the corresponding capture channel n. Figure
6.10-34 is the capture block diagram of channel 0.