diff --git a/libraries/SD/src/sd_diskio.cpp b/libraries/SD/src/sd_diskio.cpp index 0a9c86cc..fea10fcb 100644 --- a/libraries/SD/src/sd_diskio.cpp +++ b/libraries/SD/src/sd_diskio.cpp @@ -648,6 +648,7 @@ uint8_t sdcard_uninit(uint8_t pdrv) if (pdrv >= FF_VOLUMES || card == NULL) { return 1; } + sdTransaction(pdrv, GO_IDLE_STATE, 0, NULL); ff_diskio_register(pdrv, NULL); s_cards[pdrv] = NULL; esp_err_t err = ESP_OK;