4 Replies Latest reply on Nov 24, 2015 11:23 AM by clopez_1445226

    Data logger emFile

    clopez_1445226

      Hi, 

         

      I'm starting with development on PSOC and I'm interfacing a UART camera with CY8CKIT-059 and save the picture on a microSD, but when I try to save the picture I note that the function to write on the microSD is slow, cause not all data are writen on the SD. For example, the picture has a size of 25kb, but the file that I save has 10 kb. When I open the file on a hexadecimal editor I can see that lack many strings.

         

      I add the code of the function, if is needed that I upload the project tell me.

         

      ---------------------------------------------

         

      pFile = FS_FOpen(titulo, "w");
          Camara_PutArray(ReadPic,16);
          while(alar_idle==0){
              if(bufful==1){
                  FS_FWrite(&buffrec[0],1,15,pFile);
                  cont=0;
                  bufful=0;
              }
          }
          FS_FWrite(&buffrec[0],1,cont,pFile);
          FS_FClose(pFile);

         

      -------------------------------------------------

         

      My UART buffer has a size of 15 bytes, and the baud of the camera is 38400 andhe frequency on the emFile is 4000 kHz. My alar_idle is a boolean that show me if the transmission has finished, cause when I tried check the last two bytes of the transmission the result not ever was appropriate. I've tried write with FS_Write, but it was worse.

         

      I hope someone could help me.

         

      ---Updates--

         

      -I've attached the project.
      -Other problem that I had but I've solved making another routines was that I only could use the "strstr" function only once time. When start the system, but when I try to use it for take a picture, it not work.

         

      -----

         

      Thanks