cancel
Showing results for 
Search instead for 
Did you mean: 

USART HAL Compatibility with FreeRTOS

EMurp.1
Associate II

I'm trying to send data over the Virtual COM Port of an STM32H745I dev board to a Termite shell inside a FreeRTOS task. I setup USART 3 to run at the settings matching the documentation's virtual COM Port settings, and call the generated initialization method before running FreeRTOS. Inside the task, I call the HAL UART driver with HAL_UART_Transmit(&huart3, data, sizeof(data), 0xFFFFF); The function returns HAL_OK, but nothing shows up in my terminal. Is the UART driver compatible with FreeRTOS in general, and if not, is there a preferred way to send data over serial?

0693W00000LvUjYQAV.png

2 REPLIES 2
TDK
Guru

> Is the UART driver compatible with FreeRTOS in general

Yes

> is there a preferred way to send data over serial?

No, any method should work. Verify that the hardware connections are there, that you're using the appropriate pins and don't need solder bridges closed. Verify clock is being set correctly.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for the quick response -- it's much appreciated. Hardware connection should be there (USART 3 is connected to the virtual COM port on the PCB from the STM32H745I-DISCO datasheet). Jumper is set to power off the STLink USB Port (CN 14), which is plugged into my computer. Clock is set to 100MHz with an 115200 baud rate set in the CubeMX GUI. A 100MHz clock should be fine to clock data at that baud rate right? The project also has TouchGFX added, so that task is running as well. It shouldn't affect anything since I have the UART task set to preempt TouchGFX.