EmFile component write speed causing gapping data

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
sccac_1236541
Level 4
Level 4

Hi all,

   

 

   

I've somewhat successfully integrated the emfile component into my project and exported my data to my SD card.  I am currently not meeting my time constraints and I am receiving gapping data on the sd card because of the lengthy writes.

   

 

   

I have 3x44kB arrays I need transferred ever second, after sending that through sprintf() with commas and whatnot that turns into around 250kB+ per second.. is this possible?  I would assume it is but I cannot make it work with the emfile component.   Am I missing something?

   

 

   

I did come across other libraries that claim to have better read/write times it seems (here: https://code.google.com/p/psoc3-5-sdcard-library/ ), but I would rather not go to the trouble of all that if the emfile could be modified/adjusted in a way to make it work.  Even those still sound slow compared to modern SD r/w speeds.  I am using a class 10 micro which is capable of up to 10MB/s

   

 

   

thanks in advance,

   

scarlson

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The limiting factor here is the speed of the PSoC5 MCU core. The amount of data you have won't even fit into the PSoC5 sRAM, so you need to transfer it from somewhere else to main memory, and from there to the SD card. This calls for heavy use of DMA to get a decent speed, and I think this would need your own library.

0 Likes
sccac_1236541
Level 4
Level 4

hli, 

   

thanks for your response.

   

I am using an external sram to store the data on.  I was hoping to either send it driectly from the ext sram in large chunks to the sdcard or create a smaller buffer on the internal sram and send it in smaller chunks if the direct external sram is not an option.   I currently have most of this working I just have not got the sdcard part to work properly.

   

 

   

Does anyone have experience with using the DMA to transfer to the sdcard?  I've found some non-psoc examples but nothing concrete enough to understand what I should be sending/receiving via DMA to be able to write to the card.

   

 

   

thanks,

   

scarlson

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

   

We do not have an example project for SD card data transfer via DMA.

   

Thanks,

   

Hima

0 Likes