SdFat
SdFat copied to clipboard
SD-Init speed problem with v2.0.2 and Arduino Due SD-Shield
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!
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