I am using a semaphore to signal my thread from an interrupt routine (which calls osSemaphoreRelease). What I am seeing is that sometimes the osSemaphoreWait function returns, however, a timeout did not occur neither did the interrupt to set the semaphore but the semaphore wait function returns. In this situation, the return value from the osSemaphoreWait function is 1. The interrupt did not occur because a flag I set in the interrupt is not set.
I'm wondering if there is any scenario where the semaphore count can be incremented in this case without the interrupt firing which causes osSemaphoreWait to return.
Thanks.