Skip to content

Option in hardware.json to set PWM pins as output-only - #3624

Merged
pkendall64 merged 2 commits into
ExpressLRS:masterfrom
pkendall64:4.1/out-only-pwm-pins
May 28, 2026
Merged

pkendall64 merged 2 commits into
ExpressLRS:masterfrom
pkendall64:4.1/out-only-pwm-pins

Conversation

@pkendall64

Copy link
Copy Markdown
Collaborator

This is to support PWM receivers that use buffers to protect the MCU when using servos that require a high current draw on the signal pin. The option is a boolean flag called pwm_out_only, it defaults to false so is compatible with all existing receivers.

Without this PR, a user would still think that they could select Serial and/or I2C on PWM pins, and be very confused when things don't work as expected.

If a user goes to the Serial page on one such receiver, they will see the following banner on the page.
Screenshot 2026-04-22 at 12 41 59 PM

@pkendall64 pkendall64 added enhancement 🪄 New feature or request V4.1 🍑 labels Apr 22, 2026
@pkendall64
pkendall64 force-pushed the 4.1/out-only-pwm-pins branch from f0de2c6 to 149a5d2 Compare April 22, 2026 20:33

@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.

I apologize, I actually reviewed this when you posted it and never hit Submit Review as I was "just going to confirm one thing in discord first" aaaaaand then got distracted by something else.

Just to clarify the feature for posterity though, this is an all-or-nothing switch that means all the pins in pwm_outputs are buffered and therefore unidirectional. There is no per-pin granularity.

@pkendall64

Copy link
Copy Markdown
Collaborator Author

Just to clarify the feature for posterity though, this is an all-or-nothing switch that means all the pins in pwm_outputs are buffered and therefore unidirectional. There is no per-pin granularity.

Yes, it is all or nothing. If we get some that can do it piecemeal, then we can extend this.

@pkendall64
pkendall64 force-pushed the 4.1/out-only-pwm-pins branch from 149a5d2 to d425f6f Compare May 27, 2026 20:49

@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.

Unfortunately this Serial2 killer works. Tested on RM ER6. With enabled flag only "Output-only" modes are selectable.

Image

# Conflicts:
#	src/html/src/pages/connections-panel.js
@pkendall64
pkendall64 force-pushed the 4.1/out-only-pwm-pins branch from d425f6f to 1aec4cc Compare May 28, 2026 20:13
# Conflicts:
#	src/html/headers/web-lr1121-rx.h
#	src/html/headers/web-sx127x-rx-8285.h
#	src/html/headers/web-sx127x-rx.h
@pkendall64
pkendall64 force-pushed the 4.1/out-only-pwm-pins branch from 1aec4cc to d133e5f Compare May 28, 2026 20:53
@pkendall64
pkendall64 merged commit 66b84af into ExpressLRS:master May 28, 2026
26 checks passed
@pkendall64
pkendall64 deleted the 4.1/out-only-pwm-pins branch May 28, 2026 21:07
@Itay-Sharoni Itay-Sharoni mentioned this pull request Nov 10, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V4.1 🍑

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants