cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 Uart Prescaler

simountain
Associate

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

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.

View solution in original post

3 REPLIES 3
Billy OWEN
ST Employee

Hi @simountain 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy

Uwe Bonnes
Principal III

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.

Thanks for answering my question. I never worked on low power applications, that's why my brain was confused :)