Skip to content

Commit

Permalink
Slow down SPI if SDcard init fails
Browse files Browse the repository at this point in the history
  • Loading branch information
boblemaire committed Dec 19, 2022
1 parent d7621b8 commit b39918c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Firmware/IotaWatt/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ void setup()
if(!SDFS.begin()) {
log("SD initiatization failed. Retrying.");
setLedCycle(LED_SD_INIT_FAILURE);
SDFSConfig SDconfig(pin_CS_SDcard, SD_SCK_MHZ(8));
SDFS.setConfig(SDconfig);
while(!SDFS.begin()){
yield();
}
Expand Down

0 comments on commit b39918c

Please sign in to comment.