-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SD_MMC.begin() without SDcard present causes abort() #5195
Comments
I have same issue, module: ESP32 WROOM SDMMC begin and work succeed within case the SD-card have present in slot socket SD. with version: release v1.0.6
|
I confirm the bug : E (1724) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (1725) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
assertion "xQueue" failed: file "../esp-idf/components/freertos/queue.c", line 1940, function: uxQueueMessagesWaiting
abort() was called at PC 0x40195424 on core 1
Backtrace:0x400f5715:0x3ffb25300x40091871:0x3ffb2550 0x40097f3d:0x3ffb2570 0x40195424:0x3ffb25f0 0x40092d11:0x3ffb2620 0x40127d39:0x3ffb2640 0x40126217:0x3ffb2670 0x4012638e:0x3ffb26b0 0x4013113d:0x3ffb26d0 0x400dca86:0x3ffb2700 0x400db7c1:0x3ffb2780 0x400d28fc:0x3ffb27a0 0x400e56cf:0x3ffb2820
Decoding stack results
0x400f5715: panic_abort at ../esp-idf/components/esp_system/panic.c line 365
0x40091871: esp_system_abort at ../esp-idf/components/esp_system/esp_system.c line 126
0x40097f3d: abort at ../esp-idf/components/newlib/abort.c line 46
0x40195424: __assert_func at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/stdlib/assert.c line 62
0x40092d11: uxQueueMessagesWaiting at ../esp-idf/components/freertos/queue.c line 1940
0x40127d39: spi_bus_remove_device at ../esp-idf/components/driver/spi_master.c line 442
0x40126217: deinit_slot at ../esp-idf/components/driver/sdspi_host.c line 231
0x4012638e: sdspi_host_remove_device at ../esp-idf/components/driver/sdspi_host.c line 275
0x4013113d: esp_vfs_fat_sdmmc_mount at ../esp-idf/components/fatfs/vfs/vfs_fat_sdmmc.c line 361
0x400dca86: fs::SDMMCFS::begin(char const*, bool, bool) at /home/eric/.arduino15/packages/esp32/hardware/esp32/2.0.0-alpha1/libraries/SD_MMC/src/SD_MMC.cpp line 75
0x400db7c1: SETUP_FILSYS() at /media/DEV/ROB_000/rover/libraries/CAM_FILSYS/CAM_FILSYS.cpp line 21
0x400d28fc: setup() at /media/DEV/ROB_000/rover/Motion_esp_http_server/Motion_esp_http_server.ino line 69
0x400e56cf: loopTask(void*) at /home/eric/.arduino15/packages/esp32/hardware/esp32/2.0.0-alpha1/cores/esp32/main.cpp line 31 I'm using arduino-esp32 version 2.0.0-alpha1 on Esp-CAM (1 bit mode is the same behaviour). Anybody has an IDEA ??? |
The backtrace looks right, I believe it's a true bug. esp_vfs_fat_sdmmc_mount probably fails because no sd_card...
esp_err_t spi_bus_remove_device(spi_device_handle_t handle){
SPI_CHECK(handle!=NULL, "invalid handle", ESP_ERR_INVALID_ARG);
//These checks aren't exhaustive; another thread could sneak in a transaction inbetween. These are only here to
//catch design errors and aren't meant to be triggered during normal operation.
SPI_CHECK(uxQueueMessagesWaiting(handle->trans_queue)==0, "Have unfinished transactions", ESP_ERR_INVALID_STATE);
SPI_CHECK(handle->host->cur_cs == DEV_NUM_MAX || handle->host->device[handle->host->cur_cs] != handle, "Have unfinished transactions", ESP_ERR_INVALID_STATE);
SPI_CHECK(uxQueueMessagesWaiting(handle->ret_queue)==0, "Have unfinished transactions", ESP_ERR_INVALID_STATE);
//return
int spics_io_num = handle->cfg.spics_io_num;
if (spics_io_num >= 0) spicommon_cs_free_io(spics_io_num);
//Kill queues
vQueueDelete(handle->trans_queue);
vQueueDelete(handle->ret_queue);
spi_bus_lock_unregister_dev(handle->dev_lock);
assert(handle->host->device[handle->id] == handle);
handle->host->device[handle->id] = NULL;
free(handle);
return ESP_OK;
} |
As a temporary solution you can try to use the card in SPI mode :) |
Experiencing the exact same with the |
With no card present esp32 crashes instead of error
Code:
Serial output:
Stacktrace:
The text was updated successfully, but these errors were encountered: