Skip to content

Align T1000-E charge detect pins with docs#2070

Open
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:fix-t1000e-charge-detect-naming
Open

Align T1000-E charge detect pins with docs#2070
robekl wants to merge 1 commit intomeshcore-dev:devfrom
robekl:fix-t1000e-charge-detect-naming

Conversation

@robekl
Copy link
Contributor

@robekl robekl commented Mar 17, 2026

Summary

  • rename the T1000-E charge-related pins to match Seeed's current pin table
  • route the documented charger-insert signal into the existing MainBoard::isExternalPowered() API
  • keep the change narrow to T1000-E board metadata and board power detection only

Issue

The current T1000-E variant uses generic names:

  • EXT_PWR_DETECT
  • EXT_CHRG_DETECT

But Seeed's current official T1000-E hardware page is more specific:

  • P0.05 = charger insert detect
  • P1.03 = charger state

The 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 detect
  • P1.03 = Charger State
  • P1.04 = Charger Done

Fix

This change:

  • renames EXT_PWR_DETECT to CHARGER_INSERT_DETECT
  • renames EXT_CHRG_DETECT to CHARGER_STATE_DETECT
  • adds CHARGER_INSERT_ACTIVE as an explicit board macro
  • overrides T1000eBoard::isExternalPowered() to use the charger-insert signal, while still falling back to the generic nRF52 USB register check

Why 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.05 signal as Charger insert detect, but it does not explicitly state polarity. This PR therefore makes the polarity explicit with:

  • CHARGER_INSERT_ACTIVE

and 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

@robekl robekl marked this pull request as ready for review March 17, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant