Re: CY8CPROTO-062-4343w SD card

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.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hello RoDu_4468516​,

The resistor R62 is not populated by default in the CY8CPROTO-062-4343W Kit. So, pin P12_1 cannot be used as the Card Detect pin. Maybe that is where you are getting stuck.

I created a quick project to use the SDHC block of CY8CPROTO-062-4343W board. The project writes a block of data into the SD Card and then reads it back. Please let me know if this is helpful.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
1 Solution

Hi Rakshith,

it was also quite easy to increase SDHC buffer in Modus 2.0 from 64KB to 448KB.

One just had to change SDHC mode from default in syhal_sdhc.c ADMA2 to SDMA.

It seems to be that ADMA2 has 64KB limit, but SDMA has not. Thus, switching the

mode automatically allows to use larger buffer to boost data rate. To change this

setting one just  can override the library function where it is set cyhal_sdhc_init()

with another function that has required SDHC mode inside (SDMA). Perhaps, this is

not an universal solution because some function of the library may change their

behavior with SDMA. I did not test this. However, read/write works just perfect:

Starting write the 1st 448K block

Duration: 13523 us, Data rate: 33.924 MBps

Starting write the 2nd 448K block

Duration: 13523 us, Data rate: 33.924 MBps

Starting read the 1st 448K block

Duration: 10520 us, Data rate: 43.608 MBps

Starting read the 2nd 448K block

Duration: 10520 us, Data rate: 43.608 MBps

Interestingly, but cy_sd_host.c library in Modus 2.0 has only tiny improvements

comparatively to library in Modus 1.1. Necessity to reinitialize the card after each

operation in my code in Modus 1.1 was caused by some omissions.

In fact, SDHC works equally well in Modus 1.1 and 2.0, but Modus 2.0 adds

convenient high level library cyhal_sdhc that is lucking in 1.1.

Now the question about SDHC performance is closed completely.

Thank you very much for your help.

Happy programming!

Alexei

View solution in original post

18 Replies