Skip to main content
reedomneck
Associate III
June 3, 2025
Solved

ADC multiple channels read without DMA and interrupt

  • June 3, 2025
  • 4 replies
  • 533 views
  • Hello,

 

I'm using stm32u5 series MCU and I need help on below.

1. System clock I've configured to 24Mhz and how do I set my ADC clock to sample at 20Khz

2. Without DMA, single channel data collection I'm able to do but not able to do for multiple channels. 

This topic has been closed for replies.
Best answer by TDK

Your code is trying to convert multiple channels without using DMA. This is bound to lead to issues.

4 replies

TDK
June 3, 2025

Use DMA to read multiple ADC channels, or reconfigure the ADC after each one to convert only a single channel. If you are having problems, refer to an example or show your code.

"If you feel a post has answered your question, please click ""Accept as Solution""."
reedomneck
Associate III
June 3, 2025

@TDK Here is my code, I've attached my main.c file. Only this file I edited and this approach without DMA is required for me to explore the things

Please let me know if you need complete project.

TDK
TDKBest answer
June 3, 2025

Your code is trying to convert multiple channels without using DMA. This is bound to lead to issues.

"If you feel a post has answered your question, please click ""Accept as Solution""."
reedomneck
Associate III
June 3, 2025

Do you have any suggestion to get this working?

I need to demonstrate all this below option

  1. Single channel read without DMA and interrupt
  2. Multi channel read without DMA and interrupt
  3. Single channel with DMA
  4. Multi channel with DMA

As of now I'm on 2nd stage