Skip to main content
Associate
February 10, 2025
Question

ADC with DMA not capturing data as expected on STM32l496G- DISCO development kit

  • February 10, 2025
  • 1 reply
  • 366 views

I'm currently using STM32l496G-DISCO for my project which requires to sample an analog signal and get certain amount of samples in certain time. I tried doing that using a PWM generated by a timer and my ADC1 is triggered by timer1. Activated DMA to store the samples in memory. Howerver the data retrived doesn't make sense. It seems to always give constant values of 4095 where as the scope shows a different wave form.

 

 

This topic has been closed for replies.

1 reply

KnarfB
Super User
February 10, 2025

Yes, that can be done. Break it down into steps:

does the ADC work as expected in polling mode without timer and DMA?

does the PWM run?

does PWM trigger the ADC?

does the ADC trigger the DMA?

Show code and other details of what you have done.

hth

KnarfB