embedded
communication_error
ai_generated
true
UART framing error: start/stop bit mismatch
ID: embedded/uart-framing-error
88%Fix Rate
90%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 32 | active | — | — | — |
| 32 | active | — | — | — |
Root Cause
UART produces garbage or framing errors. Almost always baud rate mismatch or parity mismatch.
genericWorkarounds
-
95% success Verify both sides use identical settings: baud, data bits, stop bits, parity
Common default: 115200 8N1 (115200 baud, 8 data bits, no parity, 1 stop bit)
-
85% success Check clock source accuracy - HSI can drift causing baud errors
STM32 HSI is +/-1% at 25C but worse at extremes. Use HSE crystal for reliable UART.
-
88% success Use oscilloscope or logic analyzer to measure actual bit timing
Measure shortest pulse; 1/width = actual baud rate
Dead Ends
Common approaches that don't work:
-
Swap TX and RX wires assuming they are crossed
75% fail
TX/RX swap produces silence, not framing errors. Framing errors mean data arrives but cannot be decoded.
-
Add pull-up resistors to TX/RX lines
70% fail
UART is push-pull, not open-drain. Pull-ups do not fix framing errors.
-
Increase baud rate for faster communication
82% fail
The issue is mismatch, not speed. Both sides must agree on identical settings.