UART / RS485 Diagnostics and FAQ
- No
/dev/ttySx: inspect the controller node, driver symbol, aliases, and probe log. - Transmit works but receive does not: inspect RX pinmux, voltage, flow control, baud rate, and ground reference.
- Data arrives in chunks: this is normal TTY/scheduler behavior; frame data using protocol length, delimiters, or timeouts instead of assuming one
read()per frame. - RS485 loses the first or last byte: tune direction-enable lead/lag, GPIO polarity, and the transmit-complete interrupt.
- High-baud errors: measure clock error, signal edges, cable quality, and transceiver bandwidth.
cat /proc/tty/driver/serial
cat /proc/interrupts | grep -i uart
dmesg | grep -Ei 'uart|ttyS|serial'
General diagnostic order
- Schematic and power.
- Node and pinctrl in the final DTB.
- Final
.configand modules. - Probe, clock, reset, and IRQ logs.
- Device node and sysfs/debugfs.
- Minimal functional test.
- Stress, suspend, and abnormal hot-plug tests.
Do not treat the removal of an error log as a fix. Find the first failure and validate its upstream and downstream dependencies.