Is there anybody who might help on this?
Issue: When PSRAM is enabled, the system crashes during some hardware initialization processes (which then triggers a reboot at the door), affecting the following hardware: LCD, SD, and large files on flash.
Pin definitions:
ESP32S3(主MCU): ESP32S3(主 MCU):
GPIO0: ESP_BOOT
GPIO1:I2C_SDA
GPIO2:I2C_SCL
GPIO3:DVP_PCLK GPIO3: DVP_PCLK
GPIO4:DVP_XCLK GPIO4: DVP_XCLK
GPIO5:NRF_CS
GPIO6:NRF_SCK GPIO6: Nrf_SCK
GPIO7:NRF_MOSI GPIO7: Nrf_Mosi
GPIO8:NRF_MISO GPIO8: Nrf_MISO
GPIO9:NRF_IRQ GPIO9: Nrf IRQ
GPIO10:ESP_RXD
GPIO11:ESP_TXD
GPIO12:I2S_DI
GPIO13:I2S_WS
GPIO14:I2S_BCK
XTAL_32K_P:DVP_D7
XTAL_32K_N:DVP_D6
GPIO17:DVP_D2 GPIO17: DVP_D2
GPIO18:DVP_D5 GPIO18: DVP_D5
GPIO19:DVP_D3 GPIO19: DVP_D3
GPIO20:DVP_D4 GPIO20: DVP_D4
GPIO21:DVP_D1 GPIO21: DVP_D1
SPICS1:DVP_D0 SPICS1: DVP_D0
SPIHD:SPIHD
SPIWP:SPIWP
SPICS0:SPICS0
SPICLK:SPICLK
SPIQ:SPIQ
SPID:SPID
GPIO38:I2S_MCK
MTCK:TF_CMD
MTDO:TF_MISO
MTDI:TF_CLK MTMS:DVP_VSYNC
U0TXD:ESP_TX0
U0RXD:ESP_RX0
GPIO45:TF_CLK
GPIO46:DVP_HREF
Log:
........................................................................................................................�j..�.�+..R*j..V��,,[Y�J��Manual: set_audio_input_source() / audio_src mic|rf24
I (1796) AudioService: Disabling wake word detection
I (1796) AudioService: Disable wake word detection
I (1796) audio_input: Console: audio_src mic|rf24
W (1806) Application: Audion service started
W (1806) Application: [RF24-AUTO] timer start: tick=100ms
I (1816) uart: queue free spaces: 100
I (1816) uart: UART driver FIFO:64
I (1816) AtUart: break
I (1826) AtModem: Detect: cold boot guard 1800ms before first baud probe
I (1826) AudioService: [WW-STATE] ww_init begin arm_after_ready=0 suspend_modem_uart=0
I (1836) AudioService: WakeWord isolate: TWDT 60s (no idle monitor) for multinet load
I (1836) AudioService: WakeWord isolatie: TWDT 60s (keuringsmoniteur niet in gebruik) voor multinet-voer
I (1846) AudioService: WakeWord isolate: keep modem UART tasks running (avoid 4G RX stall during preload)
I (1866) AudioService: WakeWord isolate: 500ms settle after suspending CPU1 peers
W (2366) CustomWakeWord: [HEAP-DIAG] ww_before_model_init integrity=SKIP free_heap=8428924
W (2366) CustomWakeWord: [HEAP-DIAG] ww before_model_init integrity=SKIP free_heap=8428924
I (2366) CustomWakeWord: [WW-PSRAM] before esp_srmodel_init (local SR models from flash): spiram total=8388608 free=8386272 largest_block=8257536 | internal_free=74683
I (2376) MODEL_LOADER: The storage free size is 22272 KB
I (2376) MODEL_LOADER: The partition size is 960 KB
I (2386) MODEL_LOADER: Successfully load srmodels
E (2386) CustomWakeWord: Failed to initialize multinet, mn_name is nullptr
I (2396) CustomWakeWord: Please refer to https://pcn7cs20v8cr.feishu.cn/wiki/CpQ ... vrcxcbVnwh to add custom wake word
I (2396) CustomWakeWord: Please refer to https://pcn7cs20v8cr.feishu.cn/wiki/CpQ...vrcxcbVnwh to add custom wake word
E (2406) AudioService: Should not be here, bits: 0
I (2406) AudioService: WakeWord isolate: TWDT restored (10s, no idle monitor)
W (2406) AudioService: Audio input task stopped
E (2416) AudioService: Wake word fault latched, further init attempts disabled
E (2426) AudioService: [WW-STATE] ww_init failed, fault latched
W (2436) RF24Bridge: [RF-SPI-RECOVER] resumed by external guard
W (2436) AudioService: [WW-STATE] resume RF24 RX + SPI recover after ww_init
W (2436) AudioService: [WW-STATE] RF24 RX + SPI recover after ww_init resume
I (3626) AtUart: DetectBaudRate: start probe rounds=3, attempts/baud=2
I (3626) AtUart: Detecting baud rate... (round 1/3)
I (6486) AtUart: break
I (7166) AtUart: Detected baud rate: 921600 (round 1 attempt 1)
I (7166) AtModem: Detected modem: ML307C-DL-CN-MBRH0S00
I (7186) AtModem: Waiting for network ready...
I (7186) AtModem: Aspettando la rete pronta...
I (7766) Ml307Board: Network is ready (device_state=1)
I (7766) Ml307Board: Network ready on cold start, skip duplicate ReInitializeProtocol
I (7766) Ml307AtModem: PDP Context 1 IP: 10.181.9.15
I (7786) Ml307Board: ML307 Revision: ML307C-DL-CN-MBRH0S00
I (7786) Ml307Board: ML307 IMEI: 868381076224117
I (7786) Ml307Board: ML307 ICCID: 898604F50624D0036187
W (7796) Application: System time invalid (7), starting SNTP sync (max wait 0ms)
I (7796) Application: SNTP started; background sync only (no wait)
I (7806) MCP: Add tool: self.device.get_device_status
I (7806) MCP: Add tool: self.audio_speaker.set_volume
I (7806) MCP: Add tool: self.audio_speaker.setVolume
I (7816) MCP: Add tool: self.pm.set_sleepstatus
I (7816) MCP: Add tool: self.mode.set_recordingmode
I (7816) MCP: Add tool: self_mode.set_recordingmode
I (7816) MCP: Add tool: self.device.get_device_version
I (7826) MCP: Add tool: self.device.get_device_id
I (7826) MCP: Add tool: self.network.get_quality
I (7836) MCP: Add tool: self.device.switch_network
I (7836) MCP: Add tool: self.mode.select_server
W (7846) Settings: [NVS] nvs_open(ns=mqtt rw=0) failed: ESP_ERR_NVS_NOT_FOUND
W (7846) Settings: [NVS] nvs_open(ns=websocket rw=0) failed: ESP_ERR_NVS_NOT_FOUND
W (7856) Application: [BOOTSTRAP] no cached endpoint; survival-first: OTA deferred 5000ms (HTTPS off critical path)
W (7866) Application: [PROTO-WDT] relax TWDT to 120s for ReInitializeProtocol
W (7876) Settings: [NVS] nvs_open(ns=mqtt rw=0) failed: ESP_ERR_NVS_NOT_FOUND
W (7886) Settings: [NVS] nvs_open(ns=websocket rw=0) failed: ESP_ERR_NVS_NOT_FOUND
W (7886) Application: No protocol specified in the OTA config, using MQTT
W (7896) Settings: [NVS] nvs_open(ns=mqtt rw=0) failed: ESP_ERR_NVS_NOT_FOUND
W (7906) MQTT: MQTT endpoint is not specified
I (7906) Application: [PROTO-WDT] restore TWDT to 10s
W (7906) Application: [BOOT-PROBE] defer RF24 RX start to OnAudioChannelOpened (post-ready, conditional)
W (7916) Application: [BOOT-PROBE] SetDeviceState(Idle) enter
I (7926) Application: STATE: starting -> idle
I (7926) Application: STATE: start -> idle
I (7926) Application: [RF24-LISTEN-GATE] close: state=idle, suspend RX + disable RF24 uplink
I (7936) Application: Starting Idle mode...
I (7946) AudioService: Disabling voice processing
W (7946) Application: [BOOT-PROBE] SetDeviceState(Idle) exit dt=26ms
I (7956) Ota: Activation-Version:1
I (7956) Ota: Device-Id:a4:cb:8f:df:fd:a8
I (7956) Ota: Client-Id:948f6ddf-9680-43af-a117-6a7fb601516a
I (7966) Ota: User-Agent:hibiki_card_wifi/1.9.5.2
I (7966) SystemInfo: free sram: 101399 minimal sram: 74363
I (7976) SystemInfo: network quality: 4G csq=19 carrier=CHINA MOBILE
I (7976) Application: [RF24] post-boot: Rf24UplinkService + multiplex + audio_source hooks (SPI/RX 仍由 OnAudioChannelOpened bringup)
I (7976) Application: [RF24] post-boot: Rf24UplinkService + multiplex + audio_source hooks (SPI/RX still brought up by OnAudioChannelOpened)
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x1b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40379a0b
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x548
load:0x403c8700,len:0xc3c
load:0x403cb700,len:0x2e70
entry 0x403c8908
I (40) octal_psram: vendor id : 0x0d (AP)
I (40) octal_psram: dev id : 0x02 (generation 3)
I (40) octal_psram: density : 0x03 (64 Mbit)
I (40) octal_psram: densité : 0x03 (64 Mbit)
I (42) octal_psram: good-die : 0x01 (Pass)
I (46) octal_psram: Latency : 0x01 (Fixed)
I (51) octal_psram: VCC : 0x01 (3V)
I (55) octal_psram: SRF : 0x01 (Fast Refresh)
I (59) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (64) octal_psram: BurstLen : 0x01 (32 Byte)
I (64) octal_psram: BurstLen : 0x01 (32 Bytes)
I (69) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (74) octal_psram: DriveStrength: 0x00 (1/1)
I (78) esp_psram: Found 8MB PSRAM device
I (81) esp_psram: Speed: 40MHz
I (81) esp_psram: Velocidad: 40MHz
I (84) cpu_start: Multicore app
I (610) esp_psram: SPI SRAM memory test OK
I (618) cpu_start: Pro cpu start user code
I (619) cpu_start: cpu freq: 240000000 Hz
I (619) app_init: Application information:
I (619) app_init: Project name: xiaotian
I (623) app_init: App version: 1.9.5.2
I (627) app_init: Compile time: May 8 2026 16:40:46
I (632) app_init: ELF file SHA256: e280de576...
I (636) app_init: ESP-IDF: v5.5.1-dirty
I (640) efuse_init: Min chip rev: v0.0
I (644) efuse_init: Max chip rev: v0.99
I (648) efuse_init: Chip rev: v0.2
I (652) heap_init: Initializing. RAM available for dynamic allocation:
I (658) heap_init: At 3FCB4C80 len 00034A90 (210 KiB): RAM
I (663) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (668) heap_init: At 600FE060 len 00001F78 (7 KiB): RTCRAM
I (674) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator
I (681) spi_flash: detected chip: winbond
I (681) spi_flash: chip detektyer: winbond
I (684) spi_flash: flash io: qio
I (688) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (688) sleep GPIO: Configure to isolate all GPIO pins in sleep state
I (693) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (693) sleep GPIO: Aktivieren automatischer Schaltung der GPIO-Schlafkonfiguration
I (700) main_task: Started on CPU0
I (700) main task: Started on CPU0
I (730) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (730) esp_psram: Reserve 32K of internal memory for DMA/internal allocations
I (730) main_task: Calling app_main()
I (730) main task: Calling app_main()
I (730) main: PSRAM heap (MALLOC_CAP_SPIRAM): total=8388608 free=8386308
I (740) main: esp_reset_reason() raw=6
I (740) main: Last reset reason: 6 (TASK_WDT)
I (750) main: [NVS] nvs_flash_init OK (ESP_OK)
I (750) main: Starting in normal mode.
I (750) Board: UUID=948f6ddf-9680-43af-a117-6a7fb601516a SKU=hibiki_card_wifi
I (760) DualNetworkBoard: Initialize ML307 board
I (760) Board: UUID=948f6ddf-9680-43af-a117-6a7fb601516a SKU=hibiki_card_wifi
I (770) button: IoT Button Version: 4.1.6
I (770) HibikiWiFiBoard: [init] HibikiWiFiBoard ctor: start
I (860) HibikiWiFiBoard: [init] [order ①] I2C bus (i2c_new_master_bus once per port; legacy Wire only once/port)
I (860) HibikiWiFiBoard: [init] Arduino-style pre-delay 75 ms (power rails / bus settle)
I (860) HibikiWiFiBoard: [init] Arduino-style pre-delay 75 ms (power rails/bus settle)
I (940) HibikiWiFiBoard: [i2c-bus] before wire-prep: SDA(GPIO1)=1 SCL(GPIO2)=1 → Dual-line high (electrical idle, not required)
I (940) HibikiWiFiBoard: [i2c-wire-prep] skip i2c_driver_delete (HIBIKI_WIFI_I2C_PREP_CALL_LEGACY_DRIVER_DELETE=0)
I (950) HibikiWiFiBoard: [i2c-wire-prep] skip GPIO OD recover (HIBIKI_WIFI_I2C_PREP_GPIO_OD_RECOVER=0)
I (950) HibikiWiFiBoard: [init] skip legacy Wire simulate (HIBIKI_WIFI_I2C_LEGACY_WIRE_SIMULATE=0)
When PSRAM is enabled in sdkconfig (CONFIG_SPIRAM=y), the system frequently crashes during the initialization of certain peripherals during startup, triggering the watchdog and causing continuous restarts. The affected peripherals include:
* SD card (accessed via SDMMC or SPI mode)
* Reading large files from external Flash
* LCD display driver (via SPI interface, not yet used yet, but planned to use)
Note: With PSRAM disabled, all the above peripherals can work individually or collaboratively; however, once PSRAM is enabled, a crash will occur during the first I/O operation (such as sdmmc_card_init(), f_open(), or LCD register write) even if only one peripheral (e.g., just mounting the SD card) is initialized.
* Main control chip: ESP32-S3R8 ( 8 MB Octal PSRAM)
* PCB Design: Fully custom design (non-official development board)
* Power Supply: External 5V/2A regulated power supply, decoupling capacitors are configured near all key chips
Function / Pins Used
Octal PSRAM Dedicated Octal SPI Interface (Default Pins: SPICLK, SPICS0, SPIQ, SPID, SPIHD, SPIWP)
SD Card Uses SDMMC Interface:
MTCK (CMD)、MTDO (D0)、MTDI (CLK),
MTCK (CMD)、MTDO (D0)、MTDI (CLK),
At the same time, GPIO45 is also connected to TF_CLK — there may be a conflict
SPI peripherals (LCD/nRF24) share the SPI bus:
SPICLK、SPICS0(LCD 片选)、SPIQ (MOSI)、SPID (MISO)
SPICLK、SPICS0 (LCD chip select)、SPIQ (MOSI)、SPID (MISO)
nRF24L01 GPIO5 (CS)、GPIO6 (SCK)、GPIO7 (MOSI)、GPIO8 (MISO)
nRF24L01 GPIO5 (CS), GPIO6 (SCK), GPIO7 (MOSI), GPIO8 (MISO)
Other I²C (GPIO1/2), I²S (GPIO12–14, 38), DVP Camera (GPIO3,4,17–21, etc.)
* ESP-IDF version: v5.5.1 (Official release)
* PSRAM configuration: Octal mode, 80 MHz (ESP32-S3R8 default)
* Compilation options: GCC, optimization level -Os
* Watchdog: Task Watchdog is enabled (default)
1. Verify PSRAM is correctly recognized: esp_spiram_get_size() returns 8 MB.
2. Test each peripheral + PSRAM individually → All crash during initialization or first I/O.
3. Disable PSRAM → All peripherals run stably without issues.
4. Lower SPI clock frequency (LCD/nRF24 reduced to 1 MHz) → Problem still exists.
5. Monitor power rails with oscilloscope → No obvious voltage drop during crashes.
6. Check strapping pin usage: GPIO0, GPIO45, GPIO46 are used, but configured correctly after startup.
1. SPI bus resource conflict: Is the arbitration deadlock triggered when PSRAM, LCD, and SD card (if mistakenly connected to SPI) are caused to share internal bus or DMA resources during PSRAM activation?
2. Known issues in IDF: Does ESP-IDF v5.5.1 have cache consistency or DMA issues related to concurrent access of PSRAM + external Flash/SD card?
3. Pin configuration legality: Does connecting TF_CLK to both MTDI and GPIO45 violate the pinmux rules of ESP32-S3? Would this cause internal signal conflicts?
