cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446VET6 ADC Scan Mode

adityaganesh2k
Associate

I am trying to use ADC in scan mode in discontinuous mode in stm32f446vet6. I have ranked my channels in the order I want them to be converted in the scan mode . During the initialization I have given the number of conversions as 4 since that is the number of channels I want to convert . I want to use the scan mode in polling method where in I am using the ADC_PollForConversion function to poll for the conversion and ADC_GetValue to get the value from DR but when I am doing this I am getting the same value repeated 4 times which is the ADC count for the 1st ranked channel

1 REPLY 1
TDK
Guru

Use DMA to convert multiple channels at once. You can technically do this in polling mode, but the code needs to read the register before the next conversion comes in, which is not very practical.

Or convert a single channel and re-configure the ADC after every conversion for the next channel.

If you feel a post has answered your question, please click "Accept as Solution".