STM32L4 ADC using DMA and oversampling - 16 bit value
I want to implement the oversampling feature in the ADC read to get a better resolution for my values. Data is transmitted directly using DMA.
If I enable oversampling, I can correctly get an average value when putting a 16x oversampling ratio (the maximum available in STM32CubeMX) and a 4-bit right shift division coefficient.
Still, if I select a 16-bit resolution in the STM32CubeMX, I get an error and can't run the project. It does not accept the line
hadc1.Init.Resolution = ADC_RESOLUTION_16B;
So how could I obtain the 16-bit resolution value as presented in the product's datasheet / reference manual / etc?
Or the oversampling in this MCU is just to improve SNR with fixed 12-bit value?
Also, when I activate an oversampling ratio, I'm also reducing the effective sampling rate by the same amount, correct?
Thank you.
Kind regards,
Luiz Guilherme Enger
