Skip to main content
DBurr
Senior
November 14, 2019
Question

previously working UART interrupt not working when FreeRTOS preemptive task scheduling enabled

  • November 14, 2019
  • 0 replies
  • 640 views

Hi, I have some working code for STM32F746ZG that has a UART command line interface and FreeRTOS. It uses the "HAL_UART_Receive_IT" function and then waits for "HAL_UART_RxCpltCallback" function to set an OS flag when a character is received. When I have FreeRTOS preemptive task scheduling disabled everything works fine and dandy but when I enable preemptive task scheduling, the "HAL_UART_RxCpltCallback" doesn't fire. Any idea what I need to change for this to work with preemptive task scheduling?

If I change the thread priority of the UART thread to "Above Normal" then it works. It looks like when the priority is left at "Normal" the threads fails to start. Creating the thread appears to work but it never enters the thread function.

Thanks,

Doug

This topic has been closed for replies.