1
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ I'd think you'll have plenty of extra instructions. Your baud rate is three orders of magnitude above the baud rate. \$\endgroup\$ – Brian Dohler Jul 29 '16 at 3:59
3
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.