AnsweredAssumed Answered

STM32F4xxx - Multi-channel ADC (regular or injected conversion)?

Question asked by kenneth er on Feb 10, 2018
Latest reply on Feb 11, 2018 by kenneth er

Hi all,

 

Just wanted to check with the collective wisdom on this forum. I'm planning to do 3-channel ADC periodic sampling at 10kHz sampling rate. After reading up on the internet resources, two ways appeared to be the most reliable:

  1. Multi-channel scan regular conversion with DMA
    1. I wanted to do a simple polling routine but seemed like the normal polling method might not work that well for multi-channel as some other forum posts have suggested that some of the channels' value might get swapped at a certain interval. So this is a non-option for me. *Not too sure why it was swapped but the solution seemed to be going the DMA route since MCU operation might not be fast enough for the read.*
  2. Multi-channel injected conversion with polling
    1. Seeing that STM32F4 has 4 individual data registers to hold each channel converted reading. I have noticed that this might be one solution if injected conversion is available for your MCU.

I'm planning to go for injected conversion for its seeming ease of implementation using the HAL. However, I would like to check with you guys if this is a recommended solution? Thanks in advance~

Outcomes