cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3 ADC/DMA problem

florian239955
Associate
Posted on May 15, 2014 at 15:58

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
3 REPLIES 3
Posted on May 15, 2014 at 18:51

I think i'm missing something about some DMA interrupt handler... ADC acquisition works only once and is never refreshed.

I don't see where you are triggering the ADC

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
florian239955
Associate
Posted on May 16, 2014 at 09:10

First of all, i saw a mistake in the code posted yesterday :

ADC_InitStructure.ADC_ContinuousConvMode = ADC_ContinuousConvMode_Disable;

It's

Enable

and not

Disable.

Apologizes for the typo... I tested dozens of parameter combinations I don't see where you are triggering the ADC What am i supposed to do to trigger the ADC? I thought that in continuous mode with DMA, ADC measurements would automatically be transfered to ADC_val[]. Am I wrong?
Posted on May 16, 2014 at 15:54

Well continuous mode is just that, the measurements occur all the time, as fast as the ADC can clock. In this mode the variable will always hold the most recent sample, but you'll have next to no idea about what instant in time the samples was taken.

My aim is to acquire 3 voltage at 36kHz

Which would suggest you tie the Trigger (see the configuration parameters) of the ADC to a timer clocking at the rate/instant you want the sample at, rather than free running them.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..