According to the documentation xSemaphoreGiveFromISR returns pdTRUE if the semaphore was successfully given, otherwise errQUEUE_FULL. What is the meaning of errQUEUE_FULL? Does it mean that the semaphore was already given?
It would be useful for debugging reasons to know if an interrupt is giving a semaphore without a task taking the semaphore. How can this be accomplished?
Yes – semaphores are built on top of queues, so when you get the errQUEUE_FULL return value it means the semaphore cannot be given because it is already there. For example, if it is a binary semaphore, you can take the semaphore successfully, then give it successfully once. Once it is given the semaphore is effectively ‘full’. If you attempt to give it again without first taking it again you will get this error code returned.