Keep the display bus on GPIO46 when Display.init() ran before begin() - #382
Merged
Merged
Conversation
begin() drove GPIO46 high as a power hold before the board was known. When the application had already called Display.init(), the StopWatch QSPI io2 on GPIO46 was overwritten and never re-routed, so every pixel had a fixed bit and black showed as a bright colour. Skip the early hold in that case and apply it after the pin map is known, only on boards whose power hold is GPIO46 (Dial, Capsule, AirQ, DinMeter).
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.
On ESP32-S3,
M5.begin()drives GPIO46 high at the start as the power hold for Dial / Capsule / AirQ / DinMeter, before the board is known.When the application has already called
M5.Display.init()beforeM5.begin(), GPIO46 is already in use by the display on the StopWatch (QSPI io2).begin()overwrote it with a plain GPIO output, and the secondDisplay.init()insidebegin()returns early for a known board, so the pin was never routed back. Every pixel then had one data bit stuck at 1, and black was shown as a bright green.This PR skips the early GPIO46 output when the board is already known, and applies the power hold after the pin map is set, only on boards whose power hold is GPIO46. When
begin()is called without a priorDisplay.init(), the behaviour is unchanged.Tested (GPIO46 output select / enable / level logged at each step):
M5.begin()onlyM5.Display.init()thenM5.begin()begin()begin()