My project runs in total 13 different threads and the task facing the issue is the one with highest priority.
I am running a Freertos version 8.0.1 on Atmel SAMG55G19 microcontroller.
There is a xSemaphoreTake on my button task (task with highest priority) with a blocking period of 2 seconds. Once in a while Freertos tends to not unblock, even after the expiry of 2 seconds, the semaphore take leading to a frozen thread. I have already investigated and confirmed that no other task is interfering with this task by faulty interrupts or lengthy critical sections.
The issue is sporadic in nature and its frequency of occurrence is once or twice in a day.
Looking forward to your suggestions.