Skip to content

Fix nRF52 RS232 bridge baud initialization#3018

Open
axhoff wants to merge 1 commit into
meshcore-dev:devfrom
axhoff:agent/fix-nrf52-rs232-bridge-baud
Open

Fix nRF52 RS232 bridge baud initialization#3018
axhoff wants to merge 1 commit into
meshcore-dev:devfrom
axhoff:agent/fix-nrf52-rs232-bridge-baud

Conversation

@axhoff

@axhoff axhoff commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • restart an already-active Adafruit nRF52 UART before initializing the RS232 bridge
  • reapply the bridge pins after shutdown, then use the existing common begin(bridge_baud) path
  • leave unopened UARTs and all non-nRF52 platforms on their existing initialization paths

The pinned Adafruit nRF52 core ignores begin() while a Uart is already active. That can leave a bridge configured for 115200 baud running at an earlier component's baud rate. The active-state check is intentional: this core's end() does not guard an unopened UART, so calling it unconditionally is unsafe.

The selected UART belongs exclusively to the bridge after initialization; configurations that would otherwise share it with GPS must disable GPS.

Validation

  • pio test -e native (13 tests passed)
  • pio run -e RAK_4631_repeater_bridge_rs232_serial1
  • pio run -e RAK_4631_repeater_bridge_rs232_serial2
  • pio run -e Heltec_t114_without_display_repeater_bridge_rs232
  • pio run -e ProMicro_repeater_bridge_rs232_serial1
  • pio run -e Heltec_t096_repeater_bridge_rs232
  • adversarial implementation review: no correctness blockers found

The reported RAK3401 configuration has no official PlatformIO RS232 environment in this repository; its register-level and end-to-end hardware validation is documented in the linked issue.

Fixes #3011

@axhoff axhoff changed the title Fix nRF52 RS232 bridge baud initialization 🤖🤖 Fix nRF52 RS232 bridge baud initialization Jul 21, 2026
@axhoff
axhoff marked this pull request as ready for review July 21, 2026 16:42
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