Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART: transmitting BRK is not supported #2752

Open
Tracked by #2495
bugadani opened this issue Dec 12, 2024 · 3 comments · May be fixed by #2872
Open
Tracked by #2495

UART: transmitting BRK is not supported #2752

bugadani opened this issue Dec 12, 2024 · 3 comments · May be fixed by #2872
Labels
1.0 non-breaking Not needed for 1.0 and can be supported without breaking the driver. peripheral:uart UART peripheral

Comments

@bugadani
Copy link
Contributor

No description provided.

@zpg6
Copy link
Contributor

zpg6 commented Dec 12, 2024

ESP-IDF offers a good starting point:

int uart_write_bytes_with_break(uart_port_t uart_num, const void *src, size_t size, int brk_len)

But this only allows a BRK after the bytes. I am interested in using this for LIN bus - so a break before bytes is needed.

To keep it simple, I would love to see the function for this just be:

fn send_break(bit_length: u8) -> nb::Result<(), Error> { }

Eventually, async would be great as well.

@tom-borcin tom-borcin added the investigation Not needed for 1.0, but don't know if we can support without breaking the driver. label Dec 18, 2024
@zpg6
Copy link
Contributor

zpg6 commented Dec 21, 2024

For LIN - inverting the level of the TX line does a nice job. Accomplished this by using the PAC to set UART_TXD_INV to 1 for the break duration, then UART_TXD_INV back to 0.

@zpg6 zpg6 linked a pull request Dec 30, 2024 that will close this issue
8 tasks
@MabezDev
Copy link
Member

MabezDev commented Jan 8, 2025

We can add this after 1.0 in a non-breaking way. Looks like it should be a new API to send breaks, and @zpg6 has some draft PRs proving this.

@MabezDev MabezDev added 1.0 non-breaking Not needed for 1.0 and can be supported without breaking the driver. and removed 1.0-blocker investigation Not needed for 1.0, but don't know if we can support without breaking the driver. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 non-breaking Not needed for 1.0 and can be supported without breaking the driver. peripheral:uart UART peripheral
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants