Root cause of the "blue screen on tap": NOT a firmware bug. The touch fix worked (reached "listening"), and the mic audio then streamed upstream — which instantly triggered the upstream SDIO wedge (#167): sdio_write_task: Failed to send data: 258 (timeout) -> host restart i.e. the same wedge we fought overnight, but now provoked reliably by the sustained ~32KB/s mic upload instead of waiting minutes. The wedge is a host->slave SDIO write timeout: the slave RX buffers fill because its Wi-Fi TX cannot drain fast enough. Attempt: restore the slave Wi-Fi TX path shrunk during the RAM hunt and enlarge the SDIO queues so the burst is absorbed and drained: - WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 24->64, STATIC_RX 8->16, RX 24->32 - WIFI_RMT_TX_BA_WIN 16->32 - ESP_HOSTED_SDIO_TX_Q_SIZE / RX_Q_SIZE = 32 - SDIO clock 10->20 MHz for drain headroom (still 1-bit) Boot verified: no RAM famine, connects clean. Whether it survives the audio burst is the open question upstream has not solved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
66 lines
2.3 KiB
Plaintext
66 lines
2.3 KiB
Plaintext
# Target: Waveshare ESP32-P4-WIFI6-Touch-LCD-3.4C
|
|
CONFIG_IDF_TARGET="esp32p4"
|
|
|
|
# 32 MB NOR flash
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
|
|
|
# PSRAM at 200 MHz — REQUIRED for the 800x800 MIPI-DSI framebuffer.
|
|
# 200 MHz is gated behind IDF_EXPERIMENTAL_FEATURES; without it the build
|
|
# silently falls back to 20 MHz and the DSI underruns (mirrors the official
|
|
# 08_lvgl_demo_v9 example config).
|
|
CONFIG_SPIRAM=y
|
|
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
|
|
CONFIG_SPIRAM_SPEED_200M=y
|
|
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
|
|
CONFIG_CACHE_L2_CACHE_256KB=y
|
|
CONFIG_CACHE_L2_CACHE_LINE_128B=y
|
|
|
|
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
|
CONFIG_FREERTOS_HZ=1000
|
|
|
|
# LVGL font for the bring-up placeholder face
|
|
CONFIG_LV_FONT_MONTSERRAT_48=y
|
|
|
|
# LVGL font for status/elapsed/clock chrome
|
|
CONFIG_LV_FONT_MONTSERRAT_28=y
|
|
|
|
# ESP-Hosted C6 radio
|
|
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y
|
|
|
|
# custom fonts are uncompressed, but enable the decoder as belt-and-braces
|
|
CONFIG_LV_USE_FONT_COMPRESSED=y
|
|
|
|
# ESP-Hosted board variant + wifi-remote data-path tuning (from factory brookesia config;
|
|
# without these the RPC control path works but data frames never flow)
|
|
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
|
CONFIG_ESP_HOSTED_CP_TARGET_ESP32C6=y
|
|
CONFIG_ESP_HOSTED_P4_DEV_BOARD_FUNC_BOARD=y
|
|
CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM=16
|
|
CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM=32
|
|
CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM=64
|
|
CONFIG_WIFI_RMT_AMPDU_TX_ENABLED=y
|
|
CONFIG_WIFI_RMT_TX_BA_WIN=32
|
|
CONFIG_WIFI_RMT_AMPDU_RX_ENABLED=y
|
|
CONFIG_WIFI_RMT_RX_BA_WIN=16
|
|
|
|
# hosted task stacks MUST stay in internal RAM (PSRAM stacks assert on P4)
|
|
CONFIG_ESP_HOSTED_DFLT_TASK_FROM_SPIRAM=n
|
|
|
|
# hosted 2.x: keep internal RAM for task stacks; buffers go to PSRAM
|
|
CONFIG_ESP_HOSTED_MEMPOOL_PREFER_SPIRAM=y
|
|
# conservative SDIO clock for first data-path proof (raise after verification)
|
|
CONFIG_ESP_HOSTED_SDIO_CLOCK_FREQ_KHZ=20000
|
|
|
|
# headroom for diag event handlers that touch LVGL
|
|
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
|
|
|
|
# 1-bit SDIO: fixes the "Unrecoverable host sdio state" wedge family
|
|
# (esp-hosted-mcu #167/#148); 2.5MB/s is ~80x what voice needs
|
|
CONFIG_ESP_HOSTED_SDIO_1_BIT_BUS=y
|
|
|
|
# absorb the mic-audio upstream burst without stalling the SDIO write
|
|
CONFIG_ESP_HOSTED_SDIO_TX_Q_SIZE=32
|
|
CONFIG_ESP_HOSTED_SDIO_RX_Q_SIZE=32
|