Read first: Read the mechanism and worked trace first
Reuse the Concepts example: 115,200 baud, 8N1, a 16-character FIFO and service trigger at occupancy 8. Each character takes about 86.81 µs. Now suppose the measured worst service gap increases to 600 µs; conservatively reserve two additional in-flight characters beyond arrivals counted during that gap.
Choose the threshold from the measured worst service gap — decision record
Apply the stated local assumptions; record actual platform values before using this as an implementation checklist.
Decision / observation | Required evidence | Consequence |
|---|---|---|
Arrivals within the service bound | ceil(600 / 86.8056) = 7 characters | Round up; fractional characters cannot be assigned fractional FIFO slots |
Required reserve | 7 + 2 = 9 characters | The previous eight free slots are insufficient |
Latest illustrative trigger | Occupancy at most 16 − 9 = 7 | This is a bound before extra implementation margin |
Validate actual design | Threshold semantics, synchronisation delay and sender reaction | Do not assign unmeasured latency zero cost |
No. Eight slots remain, but the conservative stated bound needs nine before extra implementation margin. Trigger earlier than or at occupancy 7, reduce the service gap or increase buffering.
Match baud rate, data bits, parity, stop bits, polarity and flow control between endpoints. Firmware or the device description must match the controller clock, pin routing and configured interface; a UART endpoint need not have format strap pins.
Choose polling, interrupt or DMA from traffic rate, power and latency requirements; bulk versus console is a useful starting point, not a mandatory split.
FIFO watermark: leave measured headroom for worst-case service latency and bytes already in flight; no one percentage fits every baud and FIFO.
Record whether loopback is internal or external: internal loopback may bypass pads, routing, transceivers and the remote endpoint.