You are here

Emfile and micro sdcard in psoc 5lp | Cypress Semiconductor

Emfile and micro sdcard in psoc 5lp

Summary: 13 Replies, Latest post by Bob Marlowe on 02 Nov 2016 02:35 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
sonnv11's picture
User
55 posts

Hi I am using Emfile for commutication with micro sdcard. when, I set emfile have frequency 4- to 8 Mhz, micro sd card conected good. But when I set emfile have frequency >8MHZ , micro sd card not conected. Please tell me why? I want to use max freqaluency of emfile is 25MHZ. Please help me and talk for me how to dividing the frequency of emfile for conected sdcard good when set emfile is 25MHZ.

Thank so much!

HIMA's picture
Cypress Employee
359 posts

Hello 

Are you using the PSoC Creator Example project with just the clock frequency changed?

Thanks,

Hima

sonnv11's picture
User
55 posts

Hello Hima!

I am using frequency of CPU is 79Mhz. Emfile is 8MHZ, I want to use frequency for Emfile max is 25Mhz, But when I set Emfile is 25MHz, sdcard not coneted with MCU. Please help me set up frequency, firly start and connect sd card, i want to set up frequency of Emfile slow (<8MHZ)  then conected sdcard success , I want to set up frequency of Emfile fast (25Mhz). Please tell me.

hli
user_78878863's picture
User
2716 posts

Are you sure your SD card can handle this frequency?

Do you get any warnings when compiling this project with 25MHz EMFile frequency?

sonnv11's picture
User
55 posts

Hello hli!

Micro sd card can do with frequency max 80 Mhz. When it startes (init), it need a slow frequency. then it has connected successfully. we will increase frequency of Emfile on max. If you know? please tell me, how to use frequency of Emfile change (4M  to 25Mhz) by software?

hli
user_78878863's picture
User
2716 posts

AFAICS its not supported to change the SPI frequency of the emfile component.

sonnv11's picture
User
55 posts

Thank hli. We will close this topic in there. Thank so again

user_397344199's picture
User
30 posts

In case you're still looking for a way to speed up the SD card access, I could point you to a project incorporating my own SD Card SPI component and FatFS. My component uses DMA to perform the transfers (if you enable it) to achieve a read speed of up to 1.8 MBps on the cards I've tested with.

https://github.com/PolyVinalDistillate/NSDSPI

I'd be surprised if you got up to 80 MHz on the SD card though.. Wires tend not to let such high frequencies pass through easily!

Cypro100's picture
User
2 posts

I'm checking out your SD card support. I'm getting an FR_DISK_ERR when the software tries to initialize the card. It looks like the support is for a normal type 1 SD card and doesn't support SDHC or SDXC. Is that correct? The card I'm using is SDHC. I have found most micro-SD cards are SDHC.

user_397344199's picture
User
30 posts

I've definitely used it with 8 GB and 16 GB cards, which I'm pretty sure are SDHC. Have you got it running on 3.3v logic with a decoupling capacitor nearby and a good 100 mA minimum available from a power supply? SD cards can be quite sensitive to changes in power, and can suck quite a lot for short bursts as I understand. Also, try reducing the frequency of the clock by setting the divider to 2, 3, 4, etc. in the SDCARD_FAST() user-provided callback. It may be your wires for SCLK, MOSI and MISO are too long.

If you've implemented your own project using my component, make sure you've provided SDCARD_FAST() and SDCARD_SLOW() functions and also provided them to the NSDSPI_Start() function, and that these functions set the SD card component clock input to 400 kHz maximum for slow.

So far, nomatter what card I plug into my project, I've never managed to get the FR_DISK_ERR response..

dvorakvik's picture
User
110 posts

Hi PolyVinalDistillate

your PSoC_DMA_SPI FatFs implementation works fine. I wisch to update the FatFs version, but I have problems with the recompilation of your LIBRARY. Please, can you publish the updated library version (now FatFs 012b) or help me to do so.

Best regards,

Viktor

 

Log in to post new comments.