2024-06-24 04:33 AM
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:
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?
Solved! Go to Solution.
2024-06-24 05:21 AM
Read this once.
I think you have to configure this scan register and it will convert sequentially one by one.
2024-06-24 04:44 AM
Hi,
Have configured the DMA correctly?
Please refer the below images for DMA and ADC configurations.
2024-06-24 05:01 AM
Yes, I have the correct settings for dma, but configurations such as rank assignment that appear in your 2nd image do not appear on my cubemx. This is exactly my problem.
2024-06-24 05:21 AM
Read this once.
I think you have to configure this scan register and it will convert sequentially one by one.