Page MenuHomeFreeBSD

uart: Add primitive noise filtering on RX
ClosedPublic

Authored by jhibbits on Nov 20 2024, 5:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 10, 10:06 PM
Unknown Object (File)
Thu, Jan 30, 11:14 AM
Unknown Object (File)
Mon, Jan 27, 4:53 PM
Unknown Object (File)
Fri, Jan 24, 5:13 PM
Unknown Object (File)
Dec 27 2024, 7:10 AM
Unknown Object (File)
Dec 26 2024, 10:40 PM
Unknown Object (File)
Dec 26 2024, 9:34 AM
Unknown Object (File)
Nov 27 2024, 5:29 PM
Subscribers
None

Details

Reviewers
imp
markj
andrew
Summary

A long cable attached to the UART can act as an antenna if disconnected
from the other end. This can cause noise on the receive side, possibly
as reflections from the transmit side, leading to an interrupt storm.
Filter this by adding a threshold of received characters without TX
ready, above which characters are dropped. This is disabled by default,
but has been tested with a threshold of 1000+. A high threshold is
recommended to avoid dropping characters during, for instance, a large
copy/paste from the other end.

Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60704
Build 57588: arc lint + arc unit

Event Timeline

jhibbits created this revision.

Might be worth publishing the noise count as a per-dev sysctl

This revision is now accepted and ready to land.Nov 20 2024, 7:58 PM
In D47685#1087555, @imp wrote:

Might be worth publishing the noise count as a per-dev sysctl

I'll think about that for a future enhancement.