Skip to content

Fix M5Stack Unit C6L hardware definitions - #3994

Open
cassiofiorin wants to merge 1 commit into
meshcore-dev:devfrom
cassiofiorin:fix/c6l-hardware
Open

cassiofiorin wants to merge 1 commit into
meshcore-dev:devfrom
cassiofiorin:fix/c6l-hardware

Conversation

@cassiofiorin

Copy link
Copy Markdown

The C6L variant does not match the hardware it claims to support: the I2C bus is on GPIO 10/8 (not 16/17), the PI4IOE5V6408 expander that drives the antenna switch, the LNA enable and the LoRa reset is never initialised, the TCXO runs at 3.0 V (not 1.8 V), the TX LED is the on-board WS2812C on GPIO2 (P_LORA_TX_LED=15 collides with the OLED reset) and SX126X_RXEN=5 collides with the Grove/GPS TX pin, so the transceiver never sees a valid RF path.

  • UnitC6LBoard: initialise the expander (P5 = LNA_EN, P6 = ANT_SW, P7 = NRST), read the BOOT button from P0 (active low), drive the buzzer and use the button to switch OTA partitions at boot
  • move the radio/board definitions into target.cpp, matching the other variants (Board.h only holds the board class)
  • platformio.ini: correct I2C pins and TCXO voltage, use the NeoPixel as TX indicator, drop SX126X_RXEN, select the USB-CDC console (the USB port is the only accessible console on this unit) and drop the stale src_filter entry

Pins and expander register sequence follow the official Meshtastic variant for the same board (m5stack/meshtastic-firmware, variants/esp32c6/m5stack_unitc6l).

Builds: M5Stack_Unit_C6L_repeater, _room_server and _companion_radio_usb all succeed. Radio init, RX/TX and the console were verified on hardware.

The C6L variant does not match the hardware it claims to support: the I2C bus
is on GPIO 10/8 (not 16/17), the PI4IOE5V6408 expander that drives the antenna
switch, the LNA enable and the LoRa reset is never initialised, the TCXO runs
at 3.0 V (not 1.8 V), the TX LED is the on-board WS2812C on GPIO2
(P_LORA_TX_LED=15 collides with the OLED reset) and SX126X_RXEN=5 collides
with the Grove/GPS TX pin, so the transceiver never sees a valid RF path.

- UnitC6LBoard: initialise the expander (P5 = LNA_EN, P6 = ANT_SW,
  P7 = NRST), read the BOOT button from P0 (active low), drive the buzzer and
  use the button to switch OTA partitions at boot
- move the radio/board definitions into target.cpp, matching the other
  variants (Board.h only holds the board class)
- platformio.ini: correct I2C pins and TCXO voltage, use the NeoPixel as TX
  indicator, drop SX126X_RXEN, select the USB-CDC console (the USB port is the
  only accessible console on this unit) and drop the stale src_filter entry

Pins and expander register sequence follow the official Meshtastic variant for
the same board (m5stack/meshtastic-firmware, variants/esp32c6/m5stack_unitc6l).

Builds: M5Stack_Unit_C6L_repeater, _room_server and _companion_radio_usb all
succeed. Radio init, RX/TX and the console were verified on hardware.
@cassiofiorin

Copy link
Copy Markdown
Author

Hi! The workflow runs on this PR are stuck in "action required" because this is
my first contribution — GitHub requires a maintainer to approve them, and the
first batch expired without approval.

I validated locally on the PR head:

  • pio test -e native (50/50) and -e native_kiss_modem (43/43) pass
  • Heltec_v3_repeater builds clean, so the shared UI path is unaffected

Could you approve the workflow runs (or re-run them) when you get a chance?
Happy to adjust anything you spot in review.

This branch has not been deployed

No deployments
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