cancel
Showing results for 
Search instead for 
Did you mean: 

Missing ADC Samples when using double buffer circular DMA on STM32F407VG

kaihaacks
Associate II
Posted on December 19, 2013 at 11:36

The original post was too long to process during our migration. Please click on the attachment to read the original post.
2 REPLIES 2
kaihaacks
Associate II
Posted on December 19, 2013 at 13:35

I found my problem:

To check the contents of the buffers with the ADC results I set a breakpoint inside the DMA transfer complete interrupt handler and did not stop the ADC. I guess the breakpoint did not stop the ADC and it continued writing samples into the buffer.

So the content seems to be a mixture from old and new Samples.

If I stop the ADC just before the breakpoint everything works as expected.
Posted on December 19, 2013 at 17:24

Ok, yes the DMA and lots of peripherals operate autonomously of the core, got to watch that, and also that memory used in such a way is known to the compiler as volatile.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..