Fix T1000-E sensor power pin mapping#2065
Open
robekl wants to merge 1 commit intomeshcore-dev:devfrom
Open
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
P0.04as a sensor power-enable outputSENSOR_ENrail toggle from the T1000-E sensor pathPIN_3V3_EN/P1.06railIssue
The current T1000-E variant defines two different sensor-power control signals:
PIN_3V3_EN = 38(P1.06)SENSOR_EN = 4(P0.04)The firmware actively drives both of them:
initVariant()configures both as outputs and drives them lowt1000e_get_temperature()andt1000e_get_light()drive both high before samplingpowerOff()drives both low againThat is hard to reconcile with Seeed's newer official T1000-E pin table, which documents:
P1.06asSensor VCC EnableP0.04asVCC voltage detectIf that mapping is correct, the current variant is driving a voltage-detect input as if it were a rail-enable output.
Authoritative source
Seeed Studio's newer official board page:
Relevant entries from the pin table:
P0.04=VCC voltage detectP1.06=Sensor VCC EnableP0.05=Charger insert detectP1.03=Charger StateThe older page at https://wiki.seeedstudio.com/t1000_e_intro/ is less complete and conflicts with this newer table.
Fix
This change removes the stale
SENSOR_ENdefinition and stops drivingP0.04anywhere in the T1000-E implementation.After this change:
P0.04as an outputPIN_3V3_ENWhy this fixes it
This keeps sensor rail control on the pin Seeed currently documents for that purpose (
P1.06) and removes the most likely incorrect electrical behavior in the current tree: treatingP0.04as an output control line.It also avoids changing unrelated GPS, charging, or battery logic. The fix is intentionally narrow: remove the extra power-enable path that conflicts with the newer hardware documentation.
Validation
pio run -e t1000e_companion_radio_ble