Fix blank OLED on T-Beam Supreme V3 (I2C bus init + 0x3D address)#2815
Open
UltimateCodeWarrior wants to merge 1 commit into
Open
Fix blank OLED on T-Beam Supreme V3 (I2C bus init + 0x3D address)#2815UltimateCodeWarrior wants to merge 1 commit into
UltimateCodeWarrior wants to merge 1 commit into
Conversation
The SH1106 OLED on the LilyGo T-Beam Supreme V3 never lights up because: 1. The primary I2C bus (Wire) that the OLED, BME280 and magnetometer share is never initialized. The PMU/RTC use Wire1 (via XPowersLib); nothing brings up Wire on PIN_BOARD_SDA/PIN_BOARD_SCL, so the display driver talks on the wrong default pins. 2. The OLED is at I2C address 0x3D on this board (0x3C is taken by the QMC6310 magnetometer), but SH1106Display::begin() only tried 0x3C. Initialize Wire for TBEAM_SUPREME_SX1262, and have SH1106Display::begin() prefer 0x3D (only ever used by the OLED) before falling back to 0x3C. Backwards-compatible for boards with the OLED at 0x3C. Closes meshcore-dev#2609
10614ac to
b8b6598
Compare
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.
Summary
Fixes the blank OLED on the LilyGo T-Beam Supreme V3 (ESP32-S3 + SX1262 + SH1106). Closes #2609 (see also #2591).
There are two independent bugs on this board, and both are needed for the display to work:
Wire) is never initialized. On the Supreme the PMU/RTC are onWire1(GPIO 42/41, brought up byXPowersLib), while the OLED + BME280 + magnetometer are on the primaryWirebus (GPIO 17/18). Nothing ever callsWire.begin()for it, soAdafruit_SH110Xends up on the wrong (default) pins.0x3D, not0x3C. On this board0x3Cis occupied by the QMC6310 magnetometer, so the panel was moved to0x3D(per LilyGo's hardware docs).SH1106Display::begin()only ever triedDISPLAY_ADDRESS(0x3C).Changes
src/helpers/esp32/TBeamBoard.cpp— initializeWireonPIN_BOARD_SDA/PIN_BOARD_SCLforTBEAM_SUPREME_SX1262so the OLED bus is actually up beforedisplay.begin().src/helpers/ui/SH1106Display.cpp— probe0x3Dfirst (only the OLED uses it) and fall back to0x3C. This avoids the false-positive where0x3CACKs because of the magnetometer.Both changes are backwards-compatible: boards with the OLED at the standard
0x3Cand nothing at0x3Dstill resolve to0x3C.Evidence
Boot-time I2C scan on the affected board (Wire, GPIO 17/18):
0x3C= QMC6310 magnetometer0x3D= SH1106 OLED0x77= BME280After this change the display initializes at
0x3Dand renders normally.Test plan
T_Beam_S3_Supreme_SX1262_repeater): OLED renders boot logo + home screen.0x3C(e.g. standard T-Beam) to confirm the fallback path still initializes the display.