2017-10-05 06:38 AM
Hi all,
I am using STM32F407VET6 with 25MHz crystal by STM32Cube_FW_F4_V1.16. I have changed HSE_VALUE to 25000000 in system_stm32f4xx.c and RCC_OscInitStruct.PLL.PLLM = 25 in SystemClock_Config main.c, but I found that usart3 baud rate is not correct. I set the baud rate to 9600, but I got 30075 from Oscilloscope. The method I used is in
Page 9.Here is my result.
Please help me. Thank you
Regards,
Elliott
#usart #25mhz-crystal2017-10-05 06:57 AM
Post your calculation and the read out value from USARTx_BRR.
JW
2017-10-05 07:35 AM
You'd want to check HSE_VALUE in stm32f4xx_hal_conf.h, and confirm actual value used in the USART configuration/clock code.
2017-10-05 10:01 AM
Shouldn't autobaud be system-frequency-agnostic?
JW
2017-10-05 10:11 AM
One could make one that wasn't, not sure that's the case here.
Depending on where HSE_VALUE is set you can build code that has different ideas what the clock is, the conf.h is typically pulled by everything. Changing it in system_stm32f4xx.c isn't going to cut it.
2017-10-08 03:14 AM
Thank you. It works for me.