June 2015 DocID027261 Rev 1 1/14
1
AN4629
Application note
ADC hardware oversampling for microcontrollers
of the STM32 L0 and L4 series
Introduction
This application note provides an overview of the on-chip hardware Analog-to-Digital
Converter (ADC) oversampling engine integrated in microcontrollers belonging to the
STM32 L0 and L4 series.
The main benefit the user can get from the hardware oversampling is increased SNR
(signal-to-noise ratio) with less CPU interaction, resulting in overall lower power
consumption compared with the software-based implementation.
Table 1. Applicable products
Type Product series
Microcontrollers
STM32L0
STM32L4
www.st.com
Contents AN4629
2/14 DocID027261 Rev 1
Contents
1 Oversampling as a way to improve the quality of signal acquisition . 5
1.1 Quantization noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 SNR evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Processing gain achievable with oversampling . . . . . . . . . . . . . . . . . . . . . 6
1.3 Dithering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Overview of hardware oversampler in STM32 L0 and L4 microcontrollers 8
2 Hardware oversampling to reduce power consumption . . . . . . . . . . . 10
2.1 Software implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13