ESP32-P4 crashes when starting Wi-Fi after SD card access

ae68547
Posts: 5
Joined: Wed Sep 03, 2025 10:38 pm

ESP32-P4 crashes when starting Wi-Fi after SD card access

Postby ae68547 » Wed Sep 03, 2025 11:09 pm

Hello every one,

I’m working with an ESP32-P4 NANO board (Waveshare) and using ESP-IDF v5.4.2.

The issue I’m facing:
Accessing the SD card works fine.
But when I try to start Wi-Fi after using the SD card, the board crashes.
Has anyone run into this problem?
Is there any known issue with ESP-IDF 5.4.2 on ESP32-P4 when combining SD card and Wi-Fi?
When it crashes, I see the error assert failed: xQueueSemaphoreTake queue.c:1709 (( pxQueue )) as you can below

Thanks in advance!

I (1632) SDCARD WIFI TEST: Initializing SD card
W (1636) ldo: The voltage value 0 is out of the recommended range [500, 2700]
I (1643) SDCARD WIFI TEST: Mounting filesystem
I (1647) sdmmc_periph: sdmmc_host_init: SDMMC host already initialized, skipping init flow
I (1655) gpio: GPIO[43]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1663) gpio: GPIO[44]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1672) gpio: GPIO[39]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1680) gpio: GPIO[40]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1689) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1697) gpio: GPIO[42]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1832) gpio: GPIO[42]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1835) SDCARD WIFI TEST: Filesystem mounted
Name: FFFFF
Type: SDHC
Speed: 20.00 MHz (limit: 20.00 MHz)
Size: 3807MB
CSD: ver=2, sector_size=512, capacity=7796736 read_bl_len=9
SSR: bus_width=4
I (1847) gpio: GPIO[43]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1855) gpio: GPIO[44]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1864) gpio: GPIO[39]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1872) gpio: GPIO[40]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1880) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1889) gpio: GPIO[42]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1897) SDCARD WIFI TEST: Card unmounted
I (2904) transport: Attempt connection with slave: retry[0]
I (2904) transport: Reset slave using GPIO[54]
I (2904) os_wrapper_esp: GPIO [54] configured
I (2907) gpio: GPIO[54]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (4615) sdio_wrapper: SDIO master: Slot 1, Data-Lines: 4-bit Freq(KHz)[40000 KHz]
I (4615) sdio_wrapper: GPIOs: CLK[18] CMD[19] D0[14] D1[15] D2[16] D3[17] Slave_Reset[54]
I (4615) H_SDIO_DRV: Starting SDIO process rx task
I (4619) sdio_wrapper: Queues: Tx[20] Rx[20] SDIO-Rx-Mode[3]

assert failed: xQueueSemaphoreTake queue.c:1709 (( pxQueue ))
Core 0 register dump:
MEPC : 0x4ff025c8 RA : 0x4ff0982e SP : 0x4ff1d080 GP : 0x4ff13880
--- 0x4ff025c8: panic_abort at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_system/panic.c:483
--- 0x4ff0982e: flash_read at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_system/port/image_process.c:77

TP : 0x4ff1d510 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000001 S1 : 0x0000008a A0 : 0x4ff1d0c8 A1 : 0x4ff155c9
A2 : 0x00000001 A3 : 0x4ff19000 A4 : 0x00000001 A5 : 0x4ff19000
A6 : 0x0000000c A7 : 0x76757473 S2 : 0x4ff1d0c8 S3 : 0x4ff1d0cd
S4 : 0x4ff155c8 S5 : 0x4ff1d0c8 S6 : 0x00000000 S7 : 0x00000001
S8 : 0x00000000 S9 : 0x4ff19000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00011880 MTVEC : 0x4ff00003 MCAUSE : 0x00000002 MTVAL : 0x00000000
--- 0x4ff00003: _vector_table at ??:?

MHARTID : 0x00000000

Stack memory:
4ff1d080: 0x00000014 0xa5a5a5a5 0x4808803c 0x4ff11eee 0x39303731 0xa5a5a500 0x00000000 0x00000000
--- 0x4ff11eee: esp_ptr_in_drom at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_hw_support/include/esp_memory_utils.h:337
--- (inlined by) __assert_func at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/newlib/assert.c:62

4ff1d0a0: 0x00000000 0x4ff15cc8 0x4808803c 0x4ff15cac 0x4807467e 0x4ff15cd8 0x4ff1d090 0x4ff15cdc
4ff1d0c0: 0x480748cc 0x4ff155c8 0x65737361 0x66207472 0x656c6961 0x78203a64 0x75657551 0x6d655365
4ff1d0e0: 0x6f687061 0x61546572 0x7120656b 0x65756575 0x313a632e 0x20393037 0x70202828 0x65755178
4ff1d100: 0x29206575 0xa5a50029 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d120: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d140: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d160: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d180: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000000 0x00000000 0x00000000 0x48092000
4ff1d1a0: 0x4ff1d264 0x4ff1aa28 0x48083000 0x4ff0a792 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xffffffff
--- 0x4ff0a792: xQueueSemaphoreTake at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/freertos/FreeRTOS-Kernel/queue.c:1713

4ff1d1c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x48092000
4ff1d1e0: 0x4ff1d264 0x4ff1aa28 0x48083000 0x4802ba00 0xa5a5a5a5 0x00000000 0x00000000 0x00000000
--- 0x4802ba00: handle_idle_state_events at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_transaction.c:209
--- (inlined by) sdmmc_host_do_transaction at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_transaction.c:116

4ff1d200: 0x00000000 0x00000000 0x00000008 0x00000004 0x00000003 0x4ff19000 0x4ff19070 0x00000000
4ff1d220: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x48092000
4ff1d240: 0x00000000 0x4ff1aa28 0x4ff1d264 0x48026492 0x4ff1d290 0x0000023f 0x00000000 0x48028b96
--- 0x48026492: sdmmc_send_cmd at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/sdmmc/sdmmc_cmd.c:25
--- 0x48028b96: sdmmc_io_reset at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/sdmmc/sdmmc_io.c:69

4ff1d260: 0x4ff1d2cc 0x00000034 0x80000c08 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4ff1d280: 0x00000000 0x00000000 0x00000000 0x00001c00 0x00000000 0x000003e8 0x00000000 0x00000000
4ff1d2a0: 0xa5a5a5a5 0x4ff1aa28 0x00000000 0x480285be 0x00000000 0x4ff19000 0x4ff17968 0x4801a038
--- 0x480285be: sdmmc_card_init at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/sdmmc/sdmmc_init.c:72
--- 0x4801a038: hosted_sdio_card_init at /home/ae/app/ESP/P1/Projects/MFPrt/managed_components/espressif__esp_hosted/host/port/esp/freertos/src/sdio_wrapper.c:404

4ff1d2c0: 0xa5a5a5a5 0xa5a5a5a5 0x4ff17968 0x0000120b 0x00000000 0x4ff19000 0x4ff17968 0x4801a048
--- 0x4801a048: hosted_sdio_card_init at /home/ae/app/ESP/P1/Projects/MFPrt/managed_components/espressif__esp_hosted/host/port/esp/freertos/src/sdio_wrapper.c:407

4ff1d2e0: 0x0000000f 0x00000010 0x00000011 0x00000036 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d300: 0x00000077 0x00000001 0x00009c40 0x40533333 0x00000000 0x00000000 0x4802d4a6 0x4802e1c8
--- 0x4802d4a6: sdmmc_host_init at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:494
--- 0x4802e1c8: sdmmc_host_set_bus_width at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:980

4ff1d320: 0x4802e324 0x4802e364 0x4802d25c 0x4802e436 0x4802b9ca 0x4802e11a 0x4802e616 0x4802e654
--- 0x4802e324: sdmmc_host_get_slot_width at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1004
--- 0x4802e364: sdmmc_host_set_bus_ddr_mode at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1010
--- 0x4802d25c: sdmmc_host_set_card_clk at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:299
--- 0x4802e436: sdmmc_host_set_cclk_always_on at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1025
--- 0x4802b9ca: sdmmc_host_do_transaction at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_transaction.c:103
--- 0x4802e11a: sdmmc_host_deinit_slot at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:904
--- 0x4802e616: sdmmc_host_io_int_enable at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1145
--- 0x4802e654: sdmmc_host_io_int_wait at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1150

4ff1d340: 0x00000000 0x4802cbb4 0x00000000 0x4802cc94 0x00000000 0x00000000 0x4802e714 0x4802d6c0
--- 0x4802cbb4: sdmmc_host_get_real_freq at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:353
--- 0x4802cc94: sdmmc_host_set_input_delay at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:367
--- 0x4802e714: sdmmc_host_get_dma_info at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:1273
--- 0x4802d6c0: sdmmc_host_is_slot_set_to_uhs1 at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_driver_sdmmc/src/sdmmc_host.c:620

4ff1d360: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d380: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d3a0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
4ff1d3c0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x4ff03f36 0x4ff0aeba 0x4ff1d450 0x4ff13880
--- 0x4ff03f36: esp_crosscore_int_send at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/esp_system/crosscore_int.c:116
--- 0x4ff0aeba: crosscore_int_ll_get_state at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/hal/esp32p4/include/hal/crosscore_int_ll.h:59
--- (inlined by) vPortYield at /home/ae/app/ESP/P1/v5.4.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:649

4ff1d3e0: 0x4ff1d510 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4ff13178 0x00000000
4ff1d400: 0x00000000 0x00000000 0x20800008 0x500e5000 0x00000000 0x00000000 0x00000000 0x00000000
4ff1d420: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4ff1d440: 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0x00000000 0x00000000 0x00000000
4ff1d460: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4ff19000 0x00000000 0x48018408
--- 0x48018408: sdio_read_task at /home/ae/app/ESP/P1/Projects/MFPrt/managed_components/espressif__esp_hosted/host/drivers/transport/sdio/sdio_drv.c:780
--- (inlined by) sdio_read_task at /home/ae/app/ESP/P1/Projects/MFPrt/managed_components/espressif__esp_hosted/host/drivers/transport/sdio/sdio_drv.c:752

ae68547
Posts: 5
Joined: Wed Sep 03, 2025 10:38 pm

Re: ESP32-P4 crashes when starting Wi-Fi after SD card access

Postby ae68547 » Thu Sep 04, 2025 10:01 pm

Hello,

I have found solution for the issue.
I just added host.slot = SDMMC_HOST_SLOT_0;

sdmmc_host_t host = SDMMC_HOST_DEFAULT();
host.slot = SDMMC_HOST_SLOT_0;

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests