Problems getting started with CY8CKIT-059 and emfile

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

I am new to the PSoC5. I got the LED blinking example to run, but I am struggling to write data to an SD card using the emfile example project or even get the LCD to work.

   

General question: Do I have to set any GPIO properties (pullups etc.) myself when assigning a pin on the emfile component or does the built-in component do all of this automatically?

   

I have the SD card formatted in FAT32 format, I use the emf32noslfn lib. The compiler does not find the FS_FAT_SupportLFN() function. I understood this function needs to be called at the beginning of the main function when using the kit I bought?

   

The oscilloscope shows there is activity on the DI, CLK, and CS pins of my SD card.

   

I flashed the Kit prog to the current version successfully.

   

Attached please find the project file; anything else which would make sense to help someone help me?

   

 

   

Thank you very much in advance for any useful hints!

   

 

   

Ben

0 Likes
6 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Okay well welcome to PSOC forum.. Well I guess that you haven't connected your LCD correctly.  There are some other wires needed like 5 volts and Ground.  Intensity control .

   

Also no Card larger than a 2gb.

   

   

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is some information on the SD cards.

   

   

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

and perhaps you forgot to remove the C13 capacitor (P0_2)
see   here

0 Likes
Anonymous
Not applicable

Hi,

   

thanks for your hints.

   

@bobgoar: Thanks for your effort of extracting the info; I added the pullups on the SPIs, yet to no avail. (In an AVR breadboard environment with comparable wire lengths this SD card worked even without pullups, so I left them out in my first attempt). Regarding the LCD I did add power supply in the first place but I am no longer sure the display works all right.

   

@pavloven: This is an interesting one as well; I hadn't noticed there is off-chip capacitance on some pins. This was in a way my question regarding pull ups etc on GPIOs. Is it equivalent to assign miso to pin 1[6] to avoid unsoldering C13? Pin 1[6] appears to be a simple GPIO without additional circuitry. I tried this (using pin 1[6]) in the meantime, did not solve the problem... All the other pins I am using are on plain GPIOs...

   

Any other idea? Thanks again,

   

Ben

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

It seems to lack FS_FAT_SupportLFN () function associated with a license from Microsoft for long filenames 
http://www.cypress.com/documentation/component-datasheets/file-system-library-emfile
Yes, you can use the other contact ( pin 1[6])
I checked your project, it work:
(my pins: P0.5=miso 0.4=mosi 0.6=sclk 0.7=CS )

   

SD Kingston 1GB  -OK
SDHC QUMO   4GB  -OK
microSD  1GB     - ERROR
I hope you are using an external power supply 3.3V

0 Likes
Anonymous
Not applicable

Hi pavloven,

   

thank you SO MUCH for your efforts! This was the solution. Unfortunately, for an emergency in my family I was unable to answer earlier. I just tried my project with a different (standard SD instead of micro SD) as you suggested and IT WORKS.

   

So thanks again and have a wonderful Christmas 🙂

   

Ben

0 Likes