]> sigrok.org Git - libsigrokdecode.git/commit - decoders/uart/pd.py
uart: add support for break condition detection
authorGerhard Sittig <redacted>
Sun, 14 Oct 2018 18:17:35 +0000 (20:17 +0200)
committerUwe Hermann <redacted>
Tue, 16 Oct 2018 19:49:00 +0000 (21:49 +0200)
commit03a986ea61ec565b5e366b950759d4ad753d3aea
tree3d0f29b441b12f10c989d81d81f4a40d46ccde79
parent2dfe09863649bcf85e7e0c977886c243ebab19ad
uart: add support for break condition detection

There are the "traffic inspecting" wait() conditions, which check an
edge to find the start of START, then wait for sample points to grab the
bit values. Bit times are sampled in their respective center, potential
glitches around sample points get ignored.

Add another independent set of wait() conditions which check _all_ edges
regardless of any data communication. This results in the most reliable
and maintainable detection of break conditions, regardless of how they
align to data frames. Break is defined as a period of low input signal
which spans at least one frame's length. Run the edge inspection after
data inspection, which results in the most appropriate annotation output
like leading data bits (of incomplete frames), frame errors (violated
STOP bit expectations), then break conditions. This approach is most
robust in the presence of incomplete input streams.
decoders/uart/pd.py