I’m investigating camera/touchscreen hangs on the Waveshare ESP32-S3 Touch LCD 2 board after the IDF 5.5 update.
Hardware tested:
- Waveshare ESP32-S3 Touch LCD 2
- OV5640 camera
- Config:
configs/sdkconfig_display_waveshares3_touch_lcd2.defaults
- ESP-IDF: 5.5.4
Observed behavior:
- The device can hang on the
Jade DIY boot screen.
- The QR scanner can stay stuck at
Initializing....
- Exiting the camera can freeze the device.
Regression point found during testing:
52ab757c before the IDF 5.5 update: boots successfully
d931d543 after the IDF 5.5 update: hangs at the Jade DIY boot screen
This suggests the issue was exposed by the IDF 5.5 update, likely through the camera/touchscreen lifecycle on this board.
Investigation branch:
https://github.com/oroderico/Jade/tree/investigate-waveshare-s3-camera-hangs
What I found:
- During boot,
boot_process() calls jade_camera_process_images(..., show_ui=false, ...) to feed random entropy from the camera.
- On this board, that happens after touchscreen/input initialization.
jade_camera_init() and jade_camera_stop() currently restart the touchscreen whenever CONFIG_DISPLAY_TOUCHSCREEN is enabled.
- On the Waveshare ESP32-S3 Touch LCD 2, the touchscreen and camera use separate I2C buses/pins, so restarting the touchscreen around camera start/stop does not seem necessary.
- That touchscreen restart path appears to be where the hangs happen.
- The board backlight was also using LEDC timer/channel 0/0, while the camera config also references LEDC timer/channel 0/0. Moving the backlight to another LEDC timer/channel avoids that resource overlap.
The investigation branch contains a minimal board-specific test patch:
- Skip boot-time camera entropy for
CONFIG_BOARD_TYPE_WS_TOUCH_LCD2.
- Do not restart the touchscreen around camera start/stop for
CONFIG_BOARD_TYPE_WS_TOUCH_LCD2.
- Move the Waveshare backlight PWM from LEDC timer/channel 0/0 to timer 1/channel 7.
With that branch tested on hardware:
- Boot passes the
Jade DIY screen.
- Camera scanner opens.
- Camera no longer stays stuck at
Initializing....
- Exiting the camera no longer freezes.
- Re-opening the camera works.
I’m opening this as an issue first because the patch works on hardware, but I’d like feedback on whether this is the preferred direction or if the touchscreen/camera lifecycle should be handled differently for this board.
cc @CaTeIM in case he wants to follow the investigation.
I’m investigating camera/touchscreen hangs on the Waveshare ESP32-S3 Touch LCD 2 board after the IDF 5.5 update.
Hardware tested:
configs/sdkconfig_display_waveshares3_touch_lcd2.defaultsObserved behavior:
Jade DIYboot screen.Initializing....Regression point found during testing:
52ab757cbefore the IDF 5.5 update: boots successfullyd931d543after the IDF 5.5 update: hangs at theJade DIYboot screenThis suggests the issue was exposed by the IDF 5.5 update, likely through the camera/touchscreen lifecycle on this board.
Investigation branch:
https://github.com/oroderico/Jade/tree/investigate-waveshare-s3-camera-hangs
What I found:
boot_process()callsjade_camera_process_images(..., show_ui=false, ...)to feed random entropy from the camera.jade_camera_init()andjade_camera_stop()currently restart the touchscreen wheneverCONFIG_DISPLAY_TOUCHSCREENis enabled.The investigation branch contains a minimal board-specific test patch:
CONFIG_BOARD_TYPE_WS_TOUCH_LCD2.CONFIG_BOARD_TYPE_WS_TOUCH_LCD2.With that branch tested on hardware:
Jade DIYscreen.Initializing....I’m opening this as an issue first because the patch works on hardware, but I’d like feedback on whether this is the preferred direction or if the touchscreen/camera lifecycle should be handled differently for this board.
cc @CaTeIM in case he wants to follow the investigation.