SdFat icon indicating copy to clipboard operation
SdFat copied to clipboard

SD-Init speed problem with v2.0.2 and Arduino Due SD-Shield

Open guidol70 opened this issue 4 years ago • 1 comments

Hi,

as in Issue https://github.com/greiman/SdFat/issues/117 I got problems with the init of the sd-card.

While using SDfat up to version 1.1.4 I could set the max. speed to 40Mhz and the init of my external SD-Card-Shield was OK.

Now with v2.0.2 I couldnt find an option to lower the speed. Could you please give me a hint for setting this option in v2.0.2?

I did try to lower #define SD_MAX_INIT_RATE_KHZ 400 in SdFatConfig.h

or maxSck via a manual entry in SdFat.h

but didnt got a sucess with it :(

Do you got a idea for me? Many Thanks in advance!

guidol70 avatar Dec 22 '20 07:12 guidol70

Had found a solution - which I did add/change in the RunCPM source. So SDFat isnt affected :)

In the first Tab of the RunCPM.ino I had to do this change to get 40Mhz for my SDCard-Shield:

FROM:

#else _puts("Initializing SD card.\r\n"); if (SD.begin(SDINIT)) { #endif

TO:

#else _puts("Initializing SD card.\r\n"); if (SD.begin(SDINIT, SD_SCK_MHZ(40))) { #endif

guidol70 avatar Dec 22 '20 09:12 guidol70