You are here

Data logger emFile | Cypress Semiconductor

Data logger emFile

Summary: 4 Replies, Latest post by clopez_1445226 on 24 Nov 2015 11:23 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
clopez_1445226's picture
3 posts


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");


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.


-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.



HIMA's picture
Cypress Employee
169 posts


1)Can you please attach the complete project.

2)Did you check if the complete data is read from the camera over UART

3)Have you tested the same project with another SD card.



clopez_1445226's picture
3 posts

In fact, I listen the UART camera, and the transmission is OK.

I attach 2 files, the .jpg is the file that is saved on the microSD, and the .txt is all the strings that camera sends. I open and compare the files with a hex viewer (xvi32).

I've used another SD card but the problem is the same.


SmartPSoC's picture
Cypress Employee
68 posts

Hello Clopez,

How are you moving data from UART Rx buffer to buffrec? 

I suggest you to use DMA for this so that you will get more CPU time for writing into the SD card.


clopez_1445226's picture
3 posts

Sorry, is the first time that I work with a SD card, and I don't know how use the DMA, inclusively I tried to use functions as "FS_MMC_HW_X_Write" but it doesn't work. 

Log in to post new comments.