The STM32F4 ADC peripheral
Our STM32F411 microcontroller features a 12-bit ADC capable of measuring signals from up to 19 multiplexed channels. The ADC can operate in various modes, such as single, continuous, scan, or discontinuous, with the results stored in a 16-bit data register. Additionally, the ADC has an analog watchdog feature that allows the system to detect when the input voltage exceeds predefined thresholds.
Before we explain the various ADC modes, let’s understand what we mean by ADC channels.
The ADC channels
An ADC channel is a dedicated pathway through which an analog signal is fed into the ADC so that it can be converted into a digital value. Each ADC channel corresponds to a specific GPIO pin configured to operate in analog mode.
Sensors, which produce analog signals representing physical phenomena (such as temperature, light, or pressure), are interfaced with our microcontroller through these GPIO pins. By configuring a GPIO pin as an analog input...