2023-06-07 11:26 PM
Hi All,
Microcontroller running on 2Mhz clock speed, UART is configured at 115200 baud, Transmitting is working fine but facing issue while receiving data by interrupt, UART error occurred but not showing error number(huart.error =0, NO frame error, parity error, no overrun error). If i use lower baud rate its working fine,
I want to know why this behavior?
Solved! Go to Solution.
2023-06-08 12:00 AM
Check the UART peripheral clock.
For most controllers it MUST be at least 16 times the max baud rate.
So with 16 x 115k2 = 1.8432M you're getting very close to the 2 MHz.
If the UART clock is 1/2 the CPU clock, it will definitely not work.
Anyway, I would not get that close to the limits, even if the UART gets the 2 MHz.
2023-06-08 12:00 AM
Check the UART peripheral clock.
For most controllers it MUST be at least 16 times the max baud rate.
So with 16 x 115k2 = 1.8432M you're getting very close to the 2 MHz.
If the UART clock is 1/2 the CPU clock, it will definitely not work.
Anyway, I would not get that close to the limits, even if the UART gets the 2 MHz.
2023-06-08 12:03 AM
thats would be the reason
Thanks for the Answer