AnsweredAssumed Answered

freertos xSemaphoreTake stuck

Question asked by ZOHAR GOLAN on Mar 19, 2016
Latest reply on Mar 25, 2016 by ZOHAR GOLAN

Hi All,


I have a problem with the MCU On eclipse freeRtos component.

I am using k20fx512 device with the MCU On Eclipse component on KDS 3.0.0.

the freeRtos version is v8.2.0.

I have a periodic hardware interrupt which is pulsing every ~20 ms. This interrupt is giving a semaphore using



In the back end I have a task which is waiting for this semaphore in a for loop.


for (;;)


if(xSemaphoreTake(SemaphoreName, (TickType_t) 25) != pdTRUE)


     "Missed a frame interrupt.\n");




     task body



This mechanism is working perfectly until something happens and the task is not processing the task body anymore.

The interrupt is still working and when the semaphore is given in the ISR, it is returning an error, because it is already given.

the semaphore take just missed and the semaphore is still waiting endlessly.


Please advise