r2axz / bluepill-serial-monster

USB to 3 Port Serial (UART) adapter firmware for STM32 Blue Pill.
MIT License
323 stars 76 forks source link

Garbage data on config console after reset #42

Closed kzyapkov closed 2 years ago

kzyapkov commented 3 years ago

To reproduce: connect PB5 to GND and connect the USB cable. Open a screen session to the first serial port, observe some garbage data, no banner:

  *ed
Error, unknown command, use "help" to get the list of available commands.
>
>Ee    eree

This is reliably reproducible in my setup. Hitting enter does bring up the command prompt and the console can be used normally, the problem is just the garbage data at the beginning. Reproduces with main and r2axz-re-enumerate-on-reset.

Works OK if PB5 is connected to GND after the board has booted up and enumerated on the USB bus.

r2axz commented 2 years ago

Turns out it is not a bluepill-serial-monster bug, but a feature of Linux terminal subsystem. More details here: https://stackoverflow.com/questions/14866899/linux-cdc-acm-device-unexpected-characters-sent-to-device