In the STM32printf redirection experiment, when using printf to output information to the serial port, the output data will appear garbled or missing data, as shown in the figure:
It should output 122 bits of data. When the baud rate is 115200, the output is 2 bits and garbled.
Solution: Lower the baud rate, take 9600 as an example
As shown