Auto-generated SystemClock_Config() function makes UART baud rate 3x faster
- October 24, 2019
- 3 replies
- 1081 views
I am trying to make UART printf work with STM32F746-DISCO board.
I tried running printf successfully with a default clock (whatever it is--I am not sure).
I was doing it without using STM32CubeMX code generator.
Now I found the code generator to be useful, I tried using the SystemClock_Config() function it generated for my board, which increases the clock speed up to 200MHz from my understanding.
However, when I increase the clock speed with the SystemClock_Config() function, my printf does not work.
Specifically, by using a logic analyzer, I figured that the baud rate becomes too fast, around 359689 (when I set it to 115200).
I am attaching my main code below -- it is mostly just a stripped-down version of what STM32CubeMX gave me.
If I comment out SystemClock_Config() from the code, the printf works fine.
Can anyone help me with what is happening?
Thank you
