The thread is waiting for the semaphore:
while(1)
{
if( xSemaphoreTake( m_handle, ticksToWait ) == pdTRUE )
{
// Do something
}
}
However, it takes approx. 400 us before the sleeping thread, which also has the highest priority, is started. How do I reduce this time? 400 us is far too much time.
If this is the highest priority interrupt AND it is waking the highest priority task AND your application does not have huge sections where the scheduler is suspended then 400us seems improbably long.
I measure 120ns typical interrupt entry, where interrupts are above the max syscall interrupt priority and therefore not effected by critical sections.