2024-04-30 05:52 AM
I work on a project with the STM32G0 and one difference between the F0 series is, that the UART has a clock prescaler. The maximum UART peripheral clock (usart_ker_ck) is 64 MHz (max of SYSCLK and PCLK) and this clock can be prescaled with PRESC -> usart_ker_ck_pres = usart_ker_ck / PRESC. PRESC can be 2^x ( 0<=x<=8). The minimum USARTDIV value is 16. Due to oversampling, there are two different calculations for the baudrate, but I will talk only about the 16 bit oversampling, since it will produce smaller baudrates.
baudrate = usart_ker_ck_pres / USARTDIV = usart_ker_ck / (PRESC * USARTDIV)
USARTDIV can be 2^16 - 1 resulting in a minum baudrate of 3.8!
Without the prescaler (PRESC=1) the minimum baudrate is 976.5!
My question is, am I right with all that I stated here, and was the prescaler only implemented for baudrates smaller than 976.5 or am I missing something? Is there a real application for this case? I am just curious
Solved! Go to Solution.
2024-05-02 07:51 AM
Lower usart_ker_ck_pres will also mean lower usart current. Not that much needed in G0, but Usart IP is the same in U0.
2024-05-02 07:35 AM
Hi @simountain
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards,
Billy
2024-05-02 07:51 AM
Lower usart_ker_ck_pres will also mean lower usart current. Not that much needed in G0, but Usart IP is the same in U0.
2024-05-02 10:22 PM
Thanks for answering my question. I never worked on low power applications, that's why my brain was confused :)