How to speed up write data to micro sdcard use EmFile of Psoc5lp

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

cross mob
song_285461
Level 3
Level 3
First like received

Hello. I am coding a project send a file from commper to micro sdcard use emfile compoment of Psoc5lp. I set up speed SPI of Emfile is 12MHZ. Then, I wirte 1M data buffer to sdcard , it takes 2.5 minutes to complete.It is very slow, This is my code:

   

#define ONEMBYTE    1048576  // 1M BYTE
#define PHANNGUYEN  ONEMBYTE/62 // wirte 62byte for a time
#define PHANDU     (ONEMBYTE - (PHANNGUYEN*62))

   

    pFile = FS_FOpen("hehe.txt","w+");
    if(pFile!=0){
    for(ii = 0; ii < PHANNGUYEN; ii++)

   

   {
           FS_Write(pFile, buff, 62);
    }
           FS_Write(pFile,buff, PHANDU);
    }

   

Nobody help me, set up speed high wirte data to sdcard use Emfile?Thank so much!

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

Hello,

   

good starting point for you may be ....

   

Viktor

View solution in original post

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

Hello 

   

EmFile component uses library from Segger. The time required for write, depend upon the library and it is provided by a third-party. You can try porting any other third-party library and implement the SD Card interface.

   

Thanks,

   

Hima

0 Likes
lock attach
Attachments are accessible only for community members.
ViDv_264506
Level 5
Level 5
50 sign-ins 25 sign-ins 5 solutions authored

Hello,

   

good starting point for you may be ....

   

Viktor

0 Likes
song_285461
Level 3
Level 3
First like received

Thank all. I am going to try your library!

0 Likes

Hi,

Did you manage to port the library to a PSoC device? What you like to share it if possible with an example?

Thanks in advance,

Kris

0 Likes