Oversampling
Oversampling can improve the signal-to-noise ratio (SNR) by approximately 10log(OSR), where OSR is the oversampling ratio. Each oversampled result is obtained by acquiring 2OVERSAMPLE samples and combining them in an accumulate-and-average filter.
Oversampling and scanning can only be combined with BURST mode enabled. Without BURST mode, oversampling and scanning will average across multiple input channels.
- Use the built-in SAADC local timer and the SAMPLERATE register 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, the ADC automatically samples the input 2OVERSAMPLE times consecutively, with an approximate timing of (tACQ + tCONV) × 2OVERSAMPLE. Apart from extending the conversion time, it otherwise 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 CH[n].CONFIG.CHOPPING register. When chopping is enabled, the input to the ADC is alternately inverted (chopped) at the input mux, and a conversion is performed for each phase of chop. This is combined with oversampling, and ADC output is passed through the accumulate and average filter used in oversampling mode. Chopping is only avaible for slow channels.