USART baudrate in STM32L152
fCKis the APB clock frequency, I just can't find where the manual actually says that. As long as both APB1 and APB2 are the same, 32MHz, you don't have to worry which one. If they were different, then you would have to keep in mind that USART1 is on APB2, the others are on APB1. APB frequencies can be changed using RCC-&gt;CR and RCC-&gt;CFGR, but these changes are global, affecting all peripherals on that bus.

At the default 16 bit oversampling, BRR is simply the ABP frequency divided by the desired baudrate.

When OVER8=0, BRR is a fixed point number with 4 bits (0-3) holding the fractional part, i.e. 1/16 units, and the integer part is shifted left 4 bits. This is just a complicated way of saying that BRR=USARTDIV*16. Consider the original formula, with OVER8=0 it becomes Baud=fCK/(8*2*USARTDIV), therefore USARTDIV*16=BRR=fCK/Baud.

Let's verify it, 32000000/9600=3333, which is 0xD05 in hex, good. Now, for 14400 baud you'd need 32000000/14400=2222 in BRR.

It gets more complicated when using 8 bit oversampling (OVER8=1), with a "hole" in BRR at bit 3, but it would be needed only when using higher baud rates.