Categories
RTOS

FreeRTOS xSemaphoreTake always fail

Here I am using binary a semaphore to protect(lock) a shared resource. Only one of Task 1 and Task 2 can only get the lock at any given time. Problem xSemaphoreTake() always return pdFALSE which means the semaphore is not available. I’ve checked all my code, no one take the semaphore… This really drives me […]