22.3.8.3 Conversion Trigger
The conversion modes can be activated by writing a 1 to the SINGLESTART or SCANSTART bit in the ADCn_CMD register. The con-
versions can be stopped by writing a 1 to the SINGLESTOP or SCANSTOP bit in the ADCn_CMD register. A START command will
have priority over a STOP command. When the ADC is stopped in the middle of a conversion, the result buffer is cleared (the FIFO
contents for any prior conversions are still intact). Every time a STOP command is issued, the user should wait for the corresponding
status flag (SINGLEACT/SCANACT) to go low and then either read all the data in the FIFO or send the corresponding FIFOCLEAR
command. The SINGLEACT and SCANACT bits in ADCn_STATUS are set high when the modes are actively converting or have pend-
ing conversions.
It is also possible to trigger conversions from PRS signals. The PRS is treated as an asynchronous trigger. Setting PRSEN in
ADCn_SINGLECTRL/ADCn_SCANCTRL enables triggering from PRS input. Which PRS channel to listen to is defined by PRSSEL in
ADCn_SINGLECTRLX/ADCn_SCANCTRLX. When PRS trigger is selected, it is still possible to trigger a conversion from software.
Please refer to the PRS chapter for more information on how to set up the PRS channels. When the conversions are triggered using the
ADCn_CMD register, then the SINGLEACT and SCANACT bits in the ADCn_STATUS are set as soon as the START command is writ-
ten to the register. When the conversion is triggered using PRS, it takes some cycles from the time PRS trigger is received until the
SINGLEACT and SCANACT bits are set due to the synchronization requirement. If SINGLEACT is already high then sending a new
START command or a new PRS trigger for a single conversion will not have any impact as ADC already has a single conversion on-
going or a single conversion pending (single conversion can be pending if ADC is busy running a scan sequence). The same rules
apply for SCANACT and SCAN START and PRS triggers. When software issues a SINGLE/SCAN STOP command, it must wait until
SINGLEACT/ SCANACT flag goes low before issuing a new START.
The PRS may trigger the ADC in two possible ways, configured by PRSMODE in ADCn_SINGLECTRLX/ADCn_SCANCTRLX. In
PULSED mode, a PRS pulse triggers the ADC to start the ADC_CLK (if not already enabled), warm up (if not already warm), start the
acquisition period, and perform the conversion. This is identical to issuing a START command from software. In this mode, the input
sampling finishes at the end of the acquisition period (AT).
If the ADC_CLK and the source of the trigger (START command or PRS pulse) are not synchronous, the frequency of the input sam-
pling (FS), will experience a 1
1/2
to 2
1/2
ADC_CLK cycle jitter due to synchronization requirements.
To precisely control the sample frequency, the PRSMODE can be set to TIMED mode. In this mode, a long PRS pulse is expected to
trigger the ADC and its negative edge directly finishes input sampling and starts the approximation phase, giving precise sampling fre-
quency management. The restriction is that the PRS pulse has to be long enough to start the ADC_CLK (if not already enabled), and
finish the acquisition period based on the AT field in ADCn_SINGLECTRL/ADCn_SCANCTRL. The PRS pulse needs to be high when
AT event finishes. If it is not high when AT finishes, then it is ignored and input sampling finishes after AT event has ended (a two cycle
latency is added to the conversion in this scenario).
If the PRS pulse is too long (e.g., FS = 32kHz), the analog ADC start can be delayed to save power. The CONVSTARTDELAY along
with its EN in the ADCn_SINGLECTRLX or ADCn_SCANCTRLx can be programmed to implement a 0 to 8 microseconds delay. The
microsecond tick is counted by TIMEBASE with ADC_CLK similar to warmup case. This saves power as the ADC is not enabled until
the last possible microsecond before the fall edge of the PRS arrives to open the sampling switch and to start the approximation phase.
Figure 22.14 ADC PRS Timed mode with ASNEEDED ADC_CLK request on page 733
) shows PRS Timed mode triggering with
CONVSTARTDELAY and ASNEEDED ADC_CLK request. See that power is saved by both delaying the ADC EN and by requesting the
ADC_CLK only during ADC operation. This is especially useful in saving power when running the ADC in EM2 or EM3 power mode with
low sampling frequency.
ADC_CLK
ADC action
PRS
clkreq_adc_async
CONVSTARTDELAY ADC WARMUP
AT
DLYBIT12
B12
B0
IDLE
IDLE
Analog ADC EN
FULL POWER
SHUT DOWN
SHUT DOWN
adc_clk_samp
adc_clk_sar
(conversion clock)
0-8 us delay
5 us
delay sampling switch
closing till fall edge of PRS
rise edge starts adc
clock request
Adc clock request stops upon
completion of conversion
Figure 22.14. ADC PRS Timed mode with ASNEEDED ADC_CLK request
When a PRS pulse is received, if the ADC_CLK is not running (ASNEEDED mode), then the ADC requests the clock by setting
clkreq_adc_async high. If the chosen clock source (HFXO/ HFSRCCLK/ AUXHFRCO) is already running, then it takes 5 ADC_CLK
cycles after the clock request is asserted for the ADC_CLK to start. HFXO and HFSRCCLK (if chosen as ADC clock source) need to be
EFM32JG1 Reference Manual
ADC - Analog to Digital Converter
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 733