Fix ADR-045 display never refreshing (LVGL tick) + add ST7789 LCD HAL#890
Open
markt-heximal wants to merge 1 commit into
Open
Fix ADR-045 display never refreshing (LVGL tick) + add ST7789 LCD HAL#890markt-heximal wants to merge 1 commit into
markt-heximal wants to merge 1 commit into
Conversation
- Add an esp_timer-driven lv_tick_inc() in the display task. Without it LVGL's tick never advances, its 30ms refresh timer never fires, and the panel only ever shows the boot frame (CONFIG_LV_TICK_CUSTOM is unset and lv_conf.h is ignored by the Kconfig-driven managed lvgl component). Fixes ruvnet#889. - Add display_hal_st7789.c: ST7789V2 SPI LCD + CST816 touch + LEDC backlight HAL (Waveshare ESP32-S3-Touch-LCD-1.69), selected via a new DISPLAY_PANEL Kconfig choice; CMake compiles exactly one panel HAL. - Add display_ui_st7789.c: compact 240x280 UI (the 4-view AMOLED UI is laid out for 368x448 and overflows a 1.69in panel). - display_hal_refresh() backlight re-assert for transient brownout recovery. - sdkconfig.defaults.st7789 build overlay (panel select + fonts + bar).
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #889, and adds an ST7789 SPI-LCD panel HAL.
1. Display never refreshes — the critical fix
The ADR-045 LVGL UI only ever rendered its boot frame: LVGL's tick never advanced, so the 30 ms refresh timer never fired and live readouts never reached the panel.
main/lv_conf.hsetsLV_TICK_CUSTOM 1, but the managedlvgl/lvglcomponent is Kconfig-configured and ignoreslv_conf.h(# CONFIG_LV_TICK_CUSTOM is not set), and nothing calledlv_tick_inc().Fix: an
esp_timerthat callslv_tick_inc(2)every 2 ms indisplay_task_start()afterlv_init(). Host-independent → works headless. This affects every panel, including the existing SH8601 AMOLED.Isolated with a backlight-breathe beacon (LEDC, bypasses LVGL/SPI): backlight pulsed (task loop alive) while on-screen content stayed frozen → the failure is LVGL refresh, not the task or panel.
2. ST7789 SPI LCD HAL
display_hal.conly implemented the SH8601/RM67162 QSPI AMOLED path. Addeddisplay_hal_st7789.c(ESP-IDF built-inesp_lcd_new_panel_st7789+ CST816 touch + LEDC backlight) for the Waveshare ESP32-S3-Touch-LCD-1.69 (240×280), selected via a newDISPLAY_PANELKconfig choice —CMakeLists.txtcompiles exactly one panel HAL + matching UI. Added a compactdisplay_ui_st7789.csince the 4-view AMOLED UI is laid out for 368×448.Files
display_task.c— LVGL tick timer (the fix) + backlight self-healdisplay_hal_st7789.c,display_ui_st7789.c— new ST7789 panel HAL + compact 240×280 UIdisplay_hal.{c,h}—display_hal_refresh()(backlight re-assert)Kconfig.projbuild—DISPLAY_PANELchoice + ST7789 pins/geometry/touchCMakeLists.txt— per-panel HAL/UI selectionsdkconfig.defaults.st7789— build overlay (panel select, fonts, bar widget)Testing
espressif/idf:release-v5.4), targetesp32s3.Note
The LCD board boot-loops from a startup-inrush brownout on a single host-USB port (full-screen draws + WiFi connect at once); mitigated by avoiding full-white init frames + a dimmable backlight, and a ≥2 A supply resolves it fully.
🤖 Generated with Claude Code