SAADC has multiple options to improve sample accuracy. Noise shaping modes provide the highest performance by enabling a delta-sigma configuration with analog filtering, oversampling, and digital filtering. Pure oversampling is also supported.
Noise shaping
Noise shaping is implemented using the ADC peripheral within a first-order delta-sigma loop. The output is decimated and subsequently filtered with FIR filters. The sampling rate is 1 Msps in noise shaping modes and high-resolution settings (RESOLUTION ≥ 12) are recommended. Enable noise shaping by configuring the register NOISESHAPE. Depending on the selected mode, the input signal must be bandwidth limited. See Electrical specification parameters fBW,NS for details.
| Mode | Description |
|---|---|
| 0 | Noise shaping is disabled. |
| NS1 | Noise shaping and decimation by 8, giving a sample rate of 125 ksps. |
| NS2 | Noise shaping and decimation by 32, giving a sample rate of 31.25 ksps. Recommended resolution setting is 14 bits. |
| NS3 | Noise shaping with oversampling set by the register OVERSAMPLE. |
Oversampling
Oversampling can improve the signal-to-noise ratio (SNR) by approximately 10log(OSR), where OSR is the oversampling ratio. Each oversampled result is the combination of the 2OVERSAMPLE samples that have gone through an accumulate-and-average filter.
Oversampling and scanning can only be combined when burst mode is enabled. Without burst mode, oversampling and scanning will average across multiple input channels.
- Use the built-in SAADC local timer and the register SAMPLERATE to perform sampling.
- Use the TIMER peripheral and DPPI to trigger the SAADC SAMPLE task to sample 2OVERSAMPLE times at a fixed rate.
- Trigger the SAMPLE task 2OVERSAMPLE times from software.
- Enable burst mode and trigger the SAMPLE task once.
Burst mode can be enabled to avoid manually triggering the SAMPLE task 2OVERSAMPLE times. When burst is enabled, ADC automatically samples the input 2OVERSAMPLE times consecutively, with an approximate timing of (tACQ + tCONV) × 2OVERSAMPLE. Besides extending the conversion time, it behaves like one-shot mode.
A DONE event indicates that a single sample has been acquired, while a RESULTDONE event indicates that enough samples have been gathered to transfer an oversampled result to RAM.
Chopping
Chopping is a technique used to cancel offset voltages and other low frequency errors, and is enabled in the register CH[n].CONFIG.CHOPPING. When chopping is enabled, the input to ADC is alternately inverted (chopped) at the input mux, and a conversion is performed for each phase of chop. Chopping is combined with oversampling and ADC output is passed through the accumulate and average filter used in oversampling mode.