2024-05-28 10:03 PM
Hi Community,
I encountered an interesting issue: I first generated multiple FreeRTOS threads (in which the first thread is the dummy thread) using STM32CubeIDE (CMSIS V1) and then copied them to a CMake project. It worked well I have added a few implementations and all were good until the time came to remove the dummy thread. When it is being removed, it goes to execute the first thread but then moves into an infinite loop (this is verified by debugging and single stepping), and because of the watchdog configured for 5 seconds, it resets. And it repeats.
Has anyone encountered this issue?
2024-05-29 09:09 AM
Hello @newbie_stm32
The issue you're encountering when removing the dummy thread in a FreeRTOS project could be due to a variety of reasons.Could you ensure that the stack sizes for the remaining tasks are adequate. A stack that is too small can lead to a stack overflow, which might cause the behavior you're observing. Also, Check if the dummy thread was interacting with ISRs or handling any signals or events that are no longer being managed.
Since you mentioned a watchdog timer, it's possible that the system is not kicking the watchdog within the required interval due to the removed thread. Ensure that the remaining threads or the idle task are clearing the watchdog timer as needed.
2024-05-29 09:25 PM
Hi @nouirakh, thanks for your reply.
I am elaborating on some points here
What else can cause the issue?