Skip to main content
kaihaacks
Associate
December 19, 2013
Question

Missing ADC Samples when using double buffer circular DMA on STM32F407VG

  • December 19, 2013
  • 2 replies
  • 907 views
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.
    This topic has been closed for replies.

    2 replies

    kaihaacks
    kaihaacksAuthor
    Associate
    December 19, 2013
    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.
    Tesla DeLorean
    Guru
    December 19, 2013
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..