Skip to content

Fix PPM/CRSF auto detect for RX-as-TX - #3481

Merged
pkendall64 merged 3 commits into
ExpressLRS:masterfrom
pkendall64:4.0/ppm-autodetect-fix
Jan 14, 2026
Merged

pkendall64 merged 3 commits into
ExpressLRS:masterfrom
pkendall64:4.0/ppm-autodetect-fix

Conversation

@pkendall64

Copy link
Copy Markdown
Collaborator

When the code to call Serial.end() in the startup of the TX module, it completely disconnects the pin from the GPIO matrix and it appears that this also makes the pin inoperable for RMT.

This change detects if the one of the default UART pins is being used for the single-wire RCSIGNAL and if one is then do not call Serial.end() allowing the pin to be used for RMT auto-detection and PPM input or CRSF input if detected.

As part of this I also disabled using the USBSerial for C3 devices (RX-as-TX) as these pins are most likely used for other purposes and enabling USBSerial would break those usages.

Fixes #3478

@pkendall64
pkendall64 force-pushed the 4.0/ppm-autodetect-fix branch from fd78ae2 to 533279a Compare January 5, 2026 01:57
Consistency using the _RX pin definition.

@CapnBry CapnBry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cripes. Very good time to test (as with everything RX-as-TX)!

Doesn't work on master with an XR1 as TX, does after this. Nomad still works (not using U0TXD_GPIO_NUM/U0RXD_GPIO_NUM), TX16S still works as well (is using UART0's RX/TX). DEBUG_LOG also still working in Nomad using the USB port (tied to UART0)

I also experimented with other possible ways of doing this and I think your solution is the best. Excellent work dealing with the high level and low! 🤩

@pkendall64

Copy link
Copy Markdown
Collaborator Author

Yeah, I spent about a day and half figuring out the best solution. I didn't want a workaround in tx_main that we would forget about in future.

@mha1 mha1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a PPM module to test but tested this PR with a BayckRC DB 100mW Gemini RX to check CRSF works. The BayckRC receiver is working fine as TX on my NV14. The Lua script, channel data and telemetry communication with EdgeTX work fine with all external module baudrates. Bind and connection with a receiver also works great.

@pkendall64

Copy link
Copy Markdown
Collaborator Author

Easiest way to test is put EdgeTX into PPM mode and connect pin 1 (CRSF pin) of a module to pin 5 of the module.

@pkendall64
pkendall64 merged commit 56d5f15 into ExpressLRS:master Jan 14, 2026
@pkendall64
pkendall64 deleted the 4.0/ppm-autodetect-fix branch January 14, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RX-AS-TX not working on XR1 ESP32C3

3 participants