Posted on April 28, 2013 at 10:49Thank,
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?