bit difficult without a project workspace to guess what is not working. And some info about the underlying hardware (Kit? which??), SD-card size would be helpful, too.
I attached the file. It is the example project emfile. I just changed the lcd parts to uart, but the basic code is unchanged.
I am using a micro sd card slot, 4 GB. I am using a 5lp - 059 kit.
emFile max capacity is 2GB, try a smaller card.
But in the cypress datasheet for emfile they say you can use higher capacity cards. You just need to use FAT32 for more than 2 GB. So this shouldnt be a problem
update: just used another sd card slot, now the programme says that it detects the sd card and all steps are ok, except the last one (copy file). According to the programme, a txt file was created on the sd card, but when I open the sd card with my computer, it is empty
I had the failure issue above as well, and am posting something that worked for me in hopes of helping others (I've seen this issue on several forums). I don't know exactly which part of my solution actually fixed the problem, so you can try one or try them all! I got the example to work on a PSoC 5LP using the CY8CKIT-050.
1. Formatted the SD Card using the SDFormatter 4. This is the formatting tool supplied by SanDisk and they claim it's "the best" way to format an SD card.
2. Changed the SPI pins to be:
SCLK = P12.4
MOSI = P12.3
MISO = P12.2
CS = P12.0
Hope this helps someone!
I was going through your file (trying to shamelessly copy the code) and found that the source files of FS_ConfigIO.c and FS_X_OS.c are not there. Maybe that's causing the problem.
Also in case you got the program to work out, please post your final bundle here. (For me to copy)
Is there any example code of that library working with a 4Gb SDCard?
If I will need to use a bigger SDCard like 8 or 16Gb, what can I use? - PSoC hasn't support that kind of memories??