Electronic – What baud rate can be supported by this internal oscillator

oscillatorstm32stm32f0uart

I am using this STM32 MCU.

It has an internal 48Mhz oscillator. I only need to use a baud rate of up to 38.4kbps. Is this internal 48Mhz oscillator good enough for 38.4kbps baud rate?

One more question. What if I am going to use multiple uarts, say up to 4 uarts. Does the accuracy of the oscillator matter in this case? Is it the same whether 1 uart is used or all 4 uarts are going to be used?

Best Answer

You should read the datasheet of the STM32 MCU. The clock divider for the baud rate must be able to produce 38.4 kbps. 48 MHz divided by 1250 will be 38.4 kHz. Using a divider of 1280 = 5 * 256 is possible, the error of 2,3 % ist acceptable for asynchronus serial transmission of 8 databits and 1 start bit, a stop bit and a parity bit. A divider 1248 = 39 * 32 would be better. Look for the possible clock divider values. The internal 48 MHz oscillator should be better than +/- 1 % error.