stm32l072 adc multi channel reading problem
I am trying to read multiple ADC channels using the Stm32l072 microcontroller, but in CubeMX, the options for rank assignments, which I normally use to read the channels, are not available. After manually adding these rank assignments to the init functions, I noticed that when I try to read multiple channels in normal mode, both channels show the same values, indicating that I am unable to perform multi-channel reading.
I then attempted to perform this ADC reading using DMA, but observed that my reference voltage, which should be around 4095, was divided by the number of channels I was reading. For example:
- Number of channels to read: 4 -> VREF ADC value: 1.023
- Number of channels to read: 3 -> VREF ADC value: 1.365
Normally, my VREF should be 3.29V, which is very close to 4090. This observation led me to realize that I am unable to read even a single channel correctly. How can I perform multiple ADC readings with this microcontroller?


