26.3.13.2 Gain Calibration
Offset calibration must be performed prior to gain calibration. The Gain Calibration is done in the following manner:
1. Select an external ADC channel for single channel conversion (a differential channel can also be used).
2. Apply an external voltage on the selected ADC input channel. This voltage should correspond to the top of the ADC input range for
the selected reference.
3. Set SINGLEGAIN[6:0] to 64 in the ADCn_CAL and measure gain, repeat gain calibration walking the 1 in SINGLEGAIN[6] to SIN-
GLEGAIN[0] till sampled ADCn_SINGLEDATA matches expected value. This is done by setting CALEN in ADCn_CAL set to 1 and
performing single channel, reading in the raw ADC code from the ADCn_SINGLEDATA and comparing it with expected code, i.e.
0b111111111111 for single-ended or differential conversion, and 0b000000000000 for negative single-ended conversion. The target
value is ideally the top of the ADC input range, but it is recommended to use a value a couple of LSBs below in order to avoid
overshooting. The result of the binary search is written to the SINGLEGAIN field of the ADCn_CAL register.
For the VDD reference and external reference, there is no hardware gain calibration. Calibration can be done by software after taking a
sample.
26.3.14 EM2 Deep Sleep or EM3 Stop Operation
The ADC can operate in EM2 Deep Sleep or EM3 Stop mode. For EM2 Deep Sleep or EM3 Stop operation the ADC_CLK must be
selected as AUXHFRCO. The section
describes how to choose AUXHFRCO as the ADC_CLK. The AUXHFR-
CO can be kept on for as long as sample conversion is needed or it can be requested by trigger event and after the conversion is done,
the AUXHFRCO can be shut down. The second option saves power at the expense of the delay to start the AUXHFRCO oscillator. All
the trigger modes are available in EM2 Deep Sleep or EM3 Stop as well.
While in EM2 Deep Sleep or EM3 Stop, the ADC can wake the system to EM0 Active on enabled interrupts. Following interrupts can
wake up the system to EM0 Active:
• SINGLE or SCAN interrupt indicating that the corresponding FIFO has reached the DVL watermark.
• Overflow interrupt (SINGLEOF or SCANOF)
• Underflow interrupt (SINGLEUF or SCANUF), triggered if DMA pops more data than present in the FIFO while the system is asleep
• Compare interrupt (SINGLECMP or SCANCMP)
• Over voltage interrupt (VREFOV)
The ADC can also work with the DMA so that the system does not have to wake up to consume data. This can happen if the SCAN or
SINGLE interrupt is disabled and the SINGLEDMAWU or SCANDMAWU in the ADCn_CTRL is set. The DMA will be triggered by the
ADC when DVL samples become available in the corresponding FIFO. The DMA will then pop all the elements of the corresponding
FIFO and put the system back into the low power state. A system-level wake up will occur upon the DMA done interrupt. Note that other
enabled ADC interrupts can still wake up the system when operating with the DMA. For example, the user can configure the window
compare function to trip when the result reaches a certain threshold while gathering ADC data in EM2 Deep Sleep or EM3 Stop.
The ADC works with the EMU to wake up the system or the DMA. It takes 2 µs from the time the ADC request a wakeup to start of the
peripheral clocks. In this ASYNC mode of ADC_CLK, it takes 6 HFPERCLK cycles to read a single entry from the single or scan FIFO.
So, with a 20MHz HFPERCLK, it takes about 4 µs per DMA wakeup to empty a full FIFO (4 entries). This restricts the sampling rate in
EM2 Deep Sleep or EM3 Stop in order to avoid FIFO overflows.
The AUXHFRCO power can be reduced by reducing the clock speed, and the user may adjust the ADCBIASPROG field in the
ADCn_BIASPROG register to reduce active power of the ADC during the conversions, thus reducing power even more in EM2 Deep
Sleep/EM3 Stop. Refer to the data sheet for relevant power consumption numbers.
If the ADC is not to be used in EM2 Deep Sleep or EM3 Stop, then the user should ensure that the ADC is not busy before going to the
low power mode.
explains how to ensure the ADC is not busy. If the chip enters EM2 Deep Sleep or
EM3 Stop when ADC is busy without using AUXHFRCO, then the ADC clock will stop but the ADC will stay on, resulting in higher
supply current. If this occurs, the EM23ERR interrupt flag will be set. Software will see this interrupt flag only when the chip wakes up.
Reference Manual
ADC - Analog to Digital Converter
silabs.com
| Building a more connected world.
Rev. 1.1 | 868