Skip to content

Commit

Permalink
ESP32-WT-ETH01 stability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Nov 2, 2024
1 parent 9bc6a97 commit 9f90e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion microcontrollers/backend-sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool backend_sdcard::reinit(const bool close_first)
#if defined(WT_ETH01)
for(int sp=22; sp>=14; sp -= 2) {
Serial.printf("Trying %d MHz...\r\n", sp);
if (sd.begin(SdSpiConfig(pin_SD_CS, DEDICATED_SPI, SD_SCK_MHZ(sp)))) {
if (sd.begin(SdSpiConfig(pin_SD_CS, SHARED_SPI, SD_SCK_MHZ(sp)))) {
ok = true;
Serial.printf("Accessing SD card at %d MHz\r\n", sp);
break;
Expand Down
3 changes: 3 additions & 0 deletions microcontrollers/backend-sdcard.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include <mutex>
#if defined(WT_ETH01)
#define SPI_DRIVER_SELECT 1
#endif
#include <SdFat.h>
#include <string>

Expand Down

0 comments on commit 9f90e29

Please sign in to comment.