cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS scheduler gets stuck in IDLE task

mho_kh
Visitor

Hello everyone,

I'm working with an STM32H743 microcontroller, using UART in DMA mode with FreeRTOS. The system is supposed to communicate with a GPS module at a fixed baud rate of 115200.

However, when the system is powered off and back on, the GPS module defaults to a baud rate of 9600, which causes communication issues. During debugging, I observed that the tasks are blocked and the Idle Task starts running. The application seems to be stuck in the USARTx_IRQHandler, which continuously triggers.

I've tried clearing the UARTx ISR flags but the issue persists. The interrupt keeps firing and nothing seems to change.

Does scheduler need to be started manually?

Also this issue happens when I change GPS module baud rate to lower than 38400 (with trial and error)  during using system. ( higher baud rates are working properly, although I didn't evaluate timing which it's not my concern in this step).

Has anyone experienced this kind of issue, or could someone provide advice on how to resolve this?

Any suggestions would be greatly appreciated.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
mho_kh
Visitor

By clearing the interrupt flags before calling HAL_UART_IRQHandler(), I've resolved the issue of being stuck in USARTx_IRQHandler() and IDLE task.

View solution in original post

1 REPLY 1
mho_kh
Visitor

By clearing the interrupt flags before calling HAL_UART_IRQHandler(), I've resolved the issue of being stuck in USARTx_IRQHandler() and IDLE task.