Quicksand
STM32 UART Command Parser Debug
Symptom
After the host sends some non-command lines, replies still come, but PA5 and PA6 stop following commands. STATUS answers a nonsense count. The registers and bit fields are on the Datasheet tab.
Circuit
Pass condition
Every line gets its reply from figure 2. The pins follow the last motor command, whatever came before it.
Notes
The host sends commands and chatter alike for as long as the board runs. RAM budget: 1 KB static (.data plus .bss), 512 bytes of stack.