2026-05-27 3:08 AM - edited 2026-05-27 3:12 AM
The STM32Cube API provides several helper macros for working with ADC data, including:
These accept ADC resolution as input, so I guess I don’t have to convert data to a specific resolution (in the case of the third and the fourth macros)
I’m curious if they also account for ADC data alignment, or should the data from the ADC DR be normalized and right-aligned before given to them? (Except perhaps for the first one, since the number of ADC bins is independent of alignment.)