cancel
Showing results for 
Search instead for 
Did you mean: 

ADC data corruptiom

dkilshtein9
Associate II
Posted on April 25, 2013 at 10:53

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 April 25, 2013 at 11:14

Considered enabling FIFO Mode?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dkilshtein9
Associate II
Posted on April 28, 2013 at 10:49

Thank,

I looked at the FIFO mode and from what I understand, the only different from the code I posted above, is the DMA_DoubleBufferModeConfig() function that should be disabled and the and the DMA_FIFOMode_Disable should be changed into DMA_FIFOMode_Enable (in the DMA_FIFOMode field).

When I provide a pointer to the buffer and the FIFO mode is enabled and set to trigger an interrupt at half_full, then when the buffer is half full the interrupt triggers. For example if the buffer size is 10, and the data size for each conversion is one byte, then when the interrupt will occur after 5 conversions (when the buffer has 5 data bytes).

If I understood the FIFO mode correctly, the fifo mode set to half_full is like the dual mode. So if I will use the FIFO mode with the interrupt set to half_full and buffer size set to 0x62500 I will get an interrupt each 125 ms (about 32KB) with 250 KHz sample.  Since I sample the data at 250 KHz and store the data on the SD + I have other peripherals and the whole system is heavily loaded, I will not be able to keep up.

The reason I used a dual buffer is that I can use a bigger buffer (62500x2 total with TC interrupt at 62500bytes each 250ms).

Am I wrong, can I use a bigger buffer with the FIFO mode? 

Posted on April 28, 2013 at 14:32

That's not my understanding.

The FIFO is a DMA unit function to mitigate bus contention issues by adding some elasticity, and burst operation. And has nothing to do with HT/TC interrupts, or Double Buffer functions.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..