Repository navigation
Conversation
QSPIBus claimed its pins but never marked them never-reset, so reset_all_pins() in cleanup_after_vm() (run after the boot.py phase and after code.py) detached clock, data0-3 and cs from the SPI peripheral and marked them free while the display bus stayed alive. On the Waveshare ESP32-S3-Touch-AMOLED-2.41, board.DISPLAY stayed black: the QSPI pins reported free and the panel's TE line never pulsed. Mark clock, data0-3, cs and the optional dcx and reset pins never-reset right after claiming them, as paralleldisplaybus and fourwire already do. deinit() needs no change: it releases the pins with reset_pin_number(), which also clears the never-reset bit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhalbert
requested changes
Oct 24, 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.
common_hal_qspibus_qspibus_construct()claims its pins but never marks them never-reset.cleanup_after_vm()callsreset_all_pins()after the boot.py phase (whether or not a boot.py exists) and again after code.py. That resets every pin that isn't in the never-reset mask, and then rebuilds_in_use_pin_maskfrom the never-reset mask. So clock, data0-3 and cs are detached from the SPI2 peripheral and marked free, but the QSPIBus object, and the display on top of it, stays alive. After that, display transfers go nowhere and no error is raised.Symptom
On the Waveshare ESP32-S3-Touch-AMOLED-2.41 (
waveshare_esp32_s3_amoled_241),board.DISPLAYstays black. On the device:board.DISPLAY's QSPIBus is still activeFix
After each
claim_pin(), callcommon_hal_never_reset_pin(). This covers clock, data0-3, cs, and the optional dcx and reset pins.paralleldisplaybus/ParallelBus.c(espressif) andshared-module/fourwire/FourWire.calready do this for their display pins.No change is needed in
deinit(). It already callsreset_pin_number()on every bus pin, and on espressif that clears the never-reset bit. Sodisplayio.release_displays()or an explicit deinit still frees the pins.Testing
make BOARD=waveshare_esp32_s3_amoled_241builds onmain(ESP-IDF v6.1-dev).tools/codeformat.pyreports no changes.mainitself. The bug is in the shared QSPIBus driver, not the board definition, so V1 users should see the same black screen and get the same fix.QSPIBus first shipped in 10.2.0, and
waveshare_esp32_s3_amoled_241is the only board in the tree that uses it.🤖 Generated with Claude Code