AnsweredAssumed Answered

BF504F data recording problem

Question asked by Yake on Jul 17, 2017
Latest reply on Sep 22, 2017 by Jithul_Janardhanan

I am using a BF504F processor and trying to stream the data I collected from external ADC to an SD card. I used 2x8k L1 memory (core memory) sections as ping-pong buffers to stream the data. While the Sport read data from ADC to one memory section using DMA2, the DMA1 transfers the data in the other memory section to the SD card. My problem is that every time I transfer the data to SD card, I have to send a SD_MMC_CMD_WRITE_MULTIPLE_BLOCK command to SD card by RSI, which takes relatively long time to get response. Due to the limitation of my buffer size, I have to send this SD_MMC_CMD_WRITE_MULTIPLE_BLOCK very frequently for transferring the data from memory to SD card. This caused the problem that I do not have time to transfer all the data in one memory section before the other ping-pong buffer is filled up by ADC. Is there a way that I can only send SD_MMC_CMD_WRITE_MULTIPLE_BLOCK  once and then continuous to transfer the data from ping-pong buffers by only changing the DMA1 settings or pausing the DMA1 (in 2D DMA case)? The DMA1 needs to be paused in this case to wait for one ping-pong buffer to be filled up because its transferring rate is faster than the ADC data rate.