cancel
Showing results for 
Search instead for 
Did you mean: 

UART receiving issue at low clock speed

vchau.2
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
LCE
Principal

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.

View solution in original post

2 REPLIES 2
LCE
Principal

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.

vchau.2
Associate III

thats would be the reason

Thanks for the Answer