2014-12-30 02:32 AM
Hello!
I have a STM32L151CB and I need to use the UART interface. At first it worked perfectly, but after I changed the system clock from HSI (16 MHz) to MSI (2 MHz) I only receive some characters. E.g. when I send ''Hello'' I receive ''Hlo''. The UART us configured as follows: Baud rate: 115200 Word length: 8 bit Stop bits: 1 Parity: no Flow control: no It works with a baud rate of 9600, but I would prefer 115200 baud. Did I miss something or is it not possible to use a fast UART with the MSI clock? Regards, Daniel2014-12-30 07:29 AM
Hi Daniel,
Can you share your code?Can you change the baudrate 115000 to 9600 and check if you have the same behavior?2014-12-30 07:52 AM
Well the % error of the bit rate is about 3% at 2 MHz, and 0.08% at 16 MHz
You'd want to examine how you're servicing the USART, how efficiently/effectively that is being done, and if you see any overrun/underrun errors.