Skip to main content
Associate
August 23, 2024
Question

ADC-DMA configuration

  • August 23, 2024
  • 1 reply
  • 932 views

I have 6 channels on ADC1 and 2 channels on ADC2. I need the first two channels of ADC1 to be sampled simultaneously with the two channels of ADC2. The sampling needs to be triggered by a timer and occur twice each time the timer triggers.

Here’s what I did: I set the ADC mode to dual regular simultaneous + alternate trigger mode and enabled DMA access mode. I enabled continuous DMA requests and set the DMA to normal mode (not circular), so the buffer is filled only once each time the timer triggers. I also set the buffer size to 16, so the ADC channels are sampled twice and then stop once the buffer is filled. After that, the system waits for the next timer trigger.

Am I missing something?

This topic has been closed for replies.

1 reply

mƎALLEm
ST Technical Moderator
August 26, 2024

Hello,

You need always provide the MCU part number as they are different in features and architecture stand points.

Please review the tips on this link on how to ask questions in this community.

Thank you for your understanding.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.