do not halt when sd-card init failed
This commit is contained in:
parent
bb728e39b2
commit
d1f2a16835
1 changed files with 6 additions and 5 deletions
11
debugger.cpp
11
debugger.cpp
|
@ -94,15 +94,17 @@ void start_disk(console *const cnsl)
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(SHA2017)
|
||||
#if defined(ESP32_WT_ETH01)
|
||||
if (SD.begin(SdioConfig(FIFO_SDIO)))
|
||||
disk_started = true;
|
||||
#elif defined(SHA2017)
|
||||
if (SD.begin(21, SD_SCK_MHZ(10)))
|
||||
disk_started = true;
|
||||
else
|
||||
SD.initErrorHalt();
|
||||
#elif !defined(BUILD_FOR_RP2040)
|
||||
if (SD.begin(SS, SD_SCK_MHZ(15)))
|
||||
disk_started = true;
|
||||
else {
|
||||
#endif
|
||||
if (!disk_started) {
|
||||
auto err = SD.sdErrorCode();
|
||||
if (err)
|
||||
cnsl->put_string_lf(format("SDerror: 0x%x, data: 0x%x", err, SD.sdErrorData()));
|
||||
|
@ -110,7 +112,6 @@ void start_disk(console *const cnsl)
|
|||
cnsl->put_string_lf("Failed to initialize SD card");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void ls_l(console *const cnsl)
|
||||
|
|
Loading…
Add table
Reference in a new issue