cancel
Showing results for 
Search instead for 
Did you mean: 

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

pav65
Associate

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.

 

 

1 REPLY 1
KnarfB
Principal III

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