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!