You are here

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

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

Summary: 3 Replies, Latest post by sonnv11 on 02 Dec 2016 06:11 PM PST
Verified Answers: 2
Last post
Log in to post new comments.
sonnv11's picture
User
51 posts

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!

HIMA's picture
Cypress Employee
205 posts

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

dvorakvik's picture
User
110 posts

Hello,

good starting point for you may be ....

Viktor

 

 

sonnv11's picture
User
51 posts

Thank all. I am going to try your library!

Log in to post new comments.