3 Replies Latest reply on Dec 2, 2016 6:11 PM by son.nguyen

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

    son.nguyen

      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!