Example sd card speed problem?

BearPeak
Posts: 15
Joined: Fri Jul 21, 2017 3:48 am

Example sd card speed problem?

Postby BearPeak » Fri Sep 22, 2017 3:02 am

Hello,everyboy!
I have a problem do not know how to solve,I want to help everyone. Thanks.
The question is about sd card. I use the demo of sd_card.
But the speed is default : 25MHZ.I have see the sd card is high speed,but why it will init to low speed ?
I see the code ,it read csd register's max data transfer rate.Set the speed according to the return value. (0x32 0r 0x5A)
If it return value is 0x32,it will set LS bus mode(25MHZ). If it return value is 0x5A,it will set HS bus mode(50MHZ).
So now it return 0x32,How can i switch it to HS bus mode? I want spend a small amount of time to store large amounts of data.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Example sd card speed problem?

Postby ESP_igrr » Fri Sep 22, 2017 4:28 am

Which IDF version are you using?

High speed mode support was added in IDF master branch in July, in commit 6baf8195.

If you are using ESP-IDF v2.1, high speed mode is not supported there, sorry.

In IDF sdmmc driver, clock frequencies used for default speed and high speed mode are 20 and 40 MHz, respectively, because the peripheral clock divider allows only 160MHz/n frequencies, and the closest ones (26.7MHz and 53.3MHz) would be out of spec.

Who is online

Users browsing this forum: No registered users and 109 guests