diff --git a/firmware/main/desklock_main.c b/firmware/main/desklock_main.c index 9b80383..9202caa 100644 --- a/firmware/main/desklock_main.c +++ b/firmware/main/desklock_main.c @@ -16,6 +16,7 @@ #include "freertos/semphr.h" #include "freertos/task.h" #include "bsp/esp-bsp.h" +#include "soc/mipi_dsi_bridge_struct.h" #include "desklock.h" @@ -255,6 +256,15 @@ void app_main(void) }; disp_cfg.lv_adapter_cfg.task_stack_size = 16 * 1024; bsp_display_start_with_config(&disp_cfg); + + /* Raise the DSI bridge FIFO "almost empty" threshold (hardware default 512) + * so the bridge demands a DMA refill with more slack still in the FIFO. Under + * load, esp-hosted's SDIO DMA bursts win the shared PSRAM bus and briefly stall + * the DSI's continuous framebuffer read; a bigger refill margin lets the FIFO + * ride out that stall instead of draining to the hardware underrun colour (the + * blue flash). Symptom mitigation for the bus-arbitration starvation. */ + MIPI_DSI_BRIDGE.raw_buf_almost_empty_thrd.dsi_raw_buf_almost_empty_thrd = 1024; + bsp_display_backlight_on(); face_init();