
M0A21/M0A23 Series
May 06, 2022
Page
689
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
ADST
SAMPLE
A/D converter
channel select
0x0
0x2
0x3
0x7
0x0
0x2
0x3
0x7
0x0
ADDR0
ADDR2
ADDR3
ADDR7
Software clear ADST
Continuous scan on channel 0, 2, 3 and 7
SAMPLE is an internal signal indicates sample stage
Note:
Figure 6.19-6 Continuous Scan Mode on Enabled Channels Timing Diagram
External Trigger Input
In Single-cycle Scan mode, A/D conversion can be triggered by external pin request. When the TRGEN
bit of ADC_ADCR register is set to 1 to enable ADC external trigger function, setting the
TRGS(ADC_ADCR[5:4]) bits to
2’b00 is to select external trigger input from the STADC pin. Software
can set TRGCOND(ADC_ADCR[7:6]) to select trigger condition is falling/rising edge or low/high level.
If level trigger condition is selected, the STADC pin must be kept at specified state at least 8 PCLKs.
The ADST bit will be set to 1 at the 9
th
PCLK and start to convert. Conversion will keep going if external
trigger input is kept at active state in level trigger mode. It is stopped only when external condition trigger
condition disappears. If edge trigger condition is selected, the high and low state must be kept at least
4 PCLKs. Pulse that is shorter than this specification will be ignored.
Note:
User enables the external trigger function or enables ADC must be at least 4 PCLKs after enabling
ADC peripheral clock.
Timer trigger
There are 4 Timer trigger sources for ADC. When the TRGEN bit of ADC_ADCR register is set to high
to enable ADC external hardware trigger function, setting the TRGS (ADC_
ADCR[5:4]) bits to 2’b01 is
to select external hardware trigger input source from Timer trigger. The detail trigger conditions of Timer
are described descripted at TIMER0_CTL ~ TIMER3_CTL register.
PWM trigger
In Single-cycle Scan mode, A/D conversion can be triggered by PWM request. When the TRGEN bit of
ADC_ADCR register is set to high to enable ADC external hardware trigger function, setting the
TRGS(ADC_ADCR[5:4]) bits to
2’b11 is to select external hardware trigger input source from PWM
trigger. When PWM trigger is enabled, setting PTDT (ADC_ADTDCR[7:0]) bits can insert a delay time
between PWM trigger condition and ADC start conversion.
Conversion Result Monitor by Compare Mode Function
The
ADC controller provides two compare registers, ADC_ADCMPRx(x=0,1), to monitor maximum two