STM32 serial port data keeps printing 00


Preface

This situation is easy to appear in our debugging process, the most likely reason is that you have not selected the correct RCC clock source in the STMCube.


It is difficult to find the reason by looking up the code

After repeated searches, it was found that the clock source selection in STM32CubeMX was wrong.

This is the place below, remember to select the same clock source as the clock tree configuration
RCC clock source configuration

Guess you like

Origin blog.csdn.net/weixin_44235793/article/details/112990339