Align T1000-E charge detect pins with docs#2070
Open
robekl wants to merge 1 commit intomeshcore-dev:devfrom
Open
Align T1000-E charge detect pins with docs#2070robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
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
MainBoard::isExternalPowered()APIIssue
The current T1000-E variant uses generic names:
EXT_PWR_DETECTEXT_CHRG_DETECTBut Seeed's current official T1000-E hardware page is more specific:
P0.05= charger insert detectP1.03= charger stateThe current names blur those meanings, and the board-specific signals are not used by the existing board power API. As a result, T1000-E carries documented charge/power pins in the variant, but MeshCore still falls back to the generic nRF52 USB power check instead of the board-level detect line.
Authoritative source
Seeed Studio's current official T1000-E page:
Relevant pin table entries:
P0.05=Charger insert detectP1.03=Charger StateP1.04=Charger DoneFix
This change:
EXT_PWR_DETECTtoCHARGER_INSERT_DETECTEXT_CHRG_DETECTtoCHARGER_STATE_DETECTCHARGER_INSERT_ACTIVEas an explicit board macroT1000eBoard::isExternalPowered()to use the charger-insert signal, while still falling back to the generic nRF52 USB register checkWhy this fixes it
This aligns the T1000-E variant naming with the current board documentation and lets MeshCore's existing board API use the board's own documented power-detect signal.
The fallback to
NRF52Board::isExternalPowered()keeps the behavior compatible with the existing nRF52 path, while the T1000-E-specific override gives the board a more accurate hardware-specific answer when its charger-insert signal is available.Assumptions
The Seeed page names the
P0.05signal asCharger insert detect, but it does not explicitly state polarity. This PR therefore makes the polarity explicit with:CHARGER_INSERT_ACTIVEand defaults it to
HIGH, which is the most likely interpretation for a detect line named this way. If board testing shows the polarity is inverted, that can be corrected in one place without changing the board API again.Validation
pio run -e t1000e_companion_radio_ble