Skip to main content
ÖSahi.1
Associate
June 21, 2022
Question

After Enabling FreeRTOS USART Baudrate Drops Down

  • June 21, 2022
  • 1 reply
  • 1185 views

I'm trying to learn RTOS on STM32F407VG(Discovery Board). I am able to use the USART without FreeRTOS at 115200 baud rate. Nevertheless, when I enable FreeRTOS and try to send basic strings with the same USART settings(115200 baud rate etc.), I can not see the proper message from Hercules, HyperTerminal, or Serial Port Monitor at 115200 baud rate. But if I change the baud rate to 38400, I can see. It's not working at other baud rates instead of 115200. Am I missing something about the settings of RTOS?

This topic has been closed for replies.

1 reply

Andrew Neil
Super User
June 21, 2022

"Am I missing something about the settings of RTOS?"

That's something that you'd have to ask the FreeRTOS people:

https://www.freertos.org/RTOS-contact-and-support.html

https://www.freertos.org/community/overview.html

https://www.freertos.org/a00104.html#getting-started

Remember that FreeRTOS is an independent 3rd-party product - nothing to do with ST or STM32.

"if I change the baud rate to 38400, I can see"

You mean the baud rate of the terminal here?

Sounds like your FreeRTOS system is running at 1/3 the rate of your non-FreeRTOS system?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ÖSahi.1
ÖSahi.1Author
Associate
June 21, 2022

"You mean the baud rate of the terminal here?"

Yes.

"Sounds like your FreeRTOS system is running at 1/3 the rate of your non-FreeRTOS system?"

Yes. Let's make it clear.

Transmitter is Discovery Board and Receiver is PC.

Transmitter settings are at 115200 baudrate, PC settings are at 38400 baudrate.

Andrew Neil
Super User
June 21, 2022

"Transmitter settings are at 115200 baudrate"

So those setting will be correct for your non-FreeRTOS system clock.

If your FreeRTOS system clock is different, then your UART settings will need a corresponding change

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.