I need a fast way of waking a task from an interrupt, notify is tick based and is too slow

Hi All,

I’m using Version 90 and I have a problem that requires a receive interrupt that must wake up a waiting task very quickly. The xTaskNotifyWait() function does not wake the task until the next system tic ( @ 0-1mSec.). I need a way to wake the task reliably in 50uSec. or so.

Any ideas would be appreciated. Thanks in advance!

Use the xHigherPriorityTaskWoken parameter and, assuming you have preemption enabled, the interrupt will return directly to the woken task - not on the next tick interrupt. See the API documentation for details. I would provide a link but am not at my computer right now.

1 Like

Thank you for this helpful idea. I will give it a try.

Hi Richard,

Your idea works perfectly. The response is less than 10uSec. Here is the code for others:

Interrupt code:
if(SCI3.SSR.BIT.PER == 0){ //all OK
xHigherPriorityTaskWoken = pdFALSE;
xTaskNotifyFromISR(xIPCTaskHndl,0, 0, &xHigherPriorityTaskWoken);

Task code:
if(xTaskNotifyWait(0,0,0,5)){ //wait for an rx wakeup timeout
//woken by an rx interrupt
asm (“NOP”);
//woken by a timeout
asm (“NOP”);