2019-11-06 11:20 PM
I've noticed that in the STM8 standard peripheral libraries, in the UART3_Init function there is an assertion checking the baud setting:
assert_param(IS_UART3_BAUDRATE_OK(BaudRate)), which limits the baudrate to 625000.
BUT according to the datasheet the max possible baudrate is 1/16 of f_masterclk.
So my question is: is there a reason why that it is limited to 625000 hardcoded ?
2019-11-13 02:50 AM
To get the baudrate of 625000 you say you need a MCLK of 16 x 625000 = 10 MHz. As far as I see STM8AF will go up to 24 MHz, so that means you have about 2 x 8 = 16 MCLK cycles to get a byte into the uart.