Emfile and micro sdcard in psoc 5lp

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

cross mob
song_285461
Level 3
Level 3
First like received

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!

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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

View solution in original post

0 Likes
13 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello 

   

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

   

Thanks,

   

Hima

0 Likes
song_285461
Level 3
Level 3
First like received

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.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Are you sure your SD card can handle this frequency?

   

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

0 Likes

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?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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

0 Likes
song_285461
Level 3
Level 3
First like received

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

0 Likes
Anonymous
Not applicable

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!

0 Likes

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.

0 Likes
Anonymous
Not applicable

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

0 Likes

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

0 Likes
Anonymous
Not applicable

I've not looked at this for some time.. However depending on the update, it may be possible to fairly easily modify the FatFS library project I have on Github: https://github.com/PolyVinalDistillate/FatFS-Library-Project . Note, you may have to modify the header file used to link the library in PSoC Creator if there are changes to datatypes and suchlike.

   

I use code::blocks to compile, and set up code::blocks to use the ARM compiler included in PSoC Creator.

   

If you were already aware of the github for the FatFS, let me know where your problems are and I'll hopefully get a chance to look soon (teaching has started again so I can't promise to have too much time!)

0 Likes
euggersh
Level 5
Level 5
5 sign-ins First solution authored 50 replies posted

I'm not sure if this is the right place to ask this, but I'm trying to use Nick's NSDSPI component, and I can't figure out how to add it to one of my projects.  From my understanding of the PSoC Creator documentation, I need the .cyprj file for the component to be able to add it to the component catalogue.  Is there some other way that I'm missing that doesn't wrequire the component project file?

   

 

   

Thanks.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, this is a wrong place, you should have created a new topic for a new question.

   

You will need a project, a library or an archive to import a component to a project, no other choice.

   

 

   

Bob

0 Likes