fix: remove unused GPS pins and GPIO5 role conflict on M5Stack Unit C6L - #3089
fix: remove unused GPS pins and GPIO5 role conflict on M5Stack Unit C6L#3089jirogit wants to merge 1 commit into
Conversation
|
If we don't want to use GPIO4 and GPIO5 with GPS, I guess it's better to have it connected to i2c bus? those 2 pins are connected to HY2.0-4P on the bottom. |
|
Good catch, and it turns out this PR is actually a precondition for that idea. MeshCore already has a generic pattern for a second I2C bus |
Removes 3 pin definitions from the M5Stack Unit C6L build config: * GPS_RX=4 / GPS_TX=5: Unit C6L has no GPS hardware, so these are dead definitions. * SX126X_RXEN=5: shares GPIO5 with GPS_TX=5 above. Note this was not itself dead — RadioLib's setRfSwitchPins()/setRfSwitchState() actively drives GPIO5 on every TX/RX transition, independent of SX126X_DIO2_AS_RF_SWITCH=true (which switches the antenna via the SX1262's internal DIO2, not an MCU GPIO). Removing this line leaves DIO2-based switching as the sole antenna switch mechanism on this board. This is independent of the crash-loop fix in meshcore-dev#3088 (TCXO/I2C/PI4IO/TX_LED). During bisection of that issue, these 3 lines were tested both present and removed with no observed effect on the crash loop either way, so they're split out here as a separate, unrelated cleanup rather than bundled into that fix. TX/RX functionality after removing SX126X_RXEN has not yet been verified on hardware — pending before merge. GPS_RX/GPS_TX removal has no functional impact (confirmed unused). Related to meshcore-dev#2229 (split out from meshcore-dev#3088 during investigation).
457c706 to
8dc1a22
Compare
Summary
Removes 3 pin definitions from the M5Stack Unit C6L build config:
GPS_RX=4/GPS_TX=5: Unit C6L has no GPS hardware, so these are dead definitions.SX126X_RXEN=5: shares GPIO5 withGPS_TX=5above. Note this was not itself dead —RadioLib's
setRfSwitchPins()/setRfSwitchState()actively drives GPIO5 on every TX/RXtransition, independent of
SX126X_DIO2_AS_RF_SWITCH=true(which switches the antenna viathe SX1262's internal DIO2, not an MCU GPIO). Removing this line leaves DIO2-based switching
as the sole antenna switch mechanism on this board.
This is independent of the crash-loop fix in #3088 (TCXO/I2C/PI4IO/TX_LED). During bisection
of that issue, these 3 lines were tested both present and removed with no observed effect on
the crash loop either way, so they're split out here as a separate, unrelated cleanup rather
than bundled into that fix.
Testing
pio run -e M5Stack_Unit_C6L_companion_radio_usbbuilds clean.received messages successfully round-trip against a second node. No functional
regression observed. GPS_RX/GPS_TX removal has no functional impact (confirmed unused).
Related to #2229 (split out from #3088 during investigation).