xQueueReceive does not yield from ISR

petergreen0815 wrote on Sunday, March 29, 2015:


I use FreeRTOS V7.1.0 on a LPC2368 togther with Crossworks 3.0.

I have two tasks and an ISR. H-task has a high prio. L-task has a low prio.

H-task executes xQueueReceive and gets blocked as expected.
L-task executes endless background processing and has no blocking statements.
When the ISR is called, I use the following code and would expect H-task to resume.

portBASE_TYPE taskWoken=pdFALSE;
taskWoken = xQueueSendToBackFromISR(xWavPlayerRequestQueue,&pWavFile,&taskWoken);
if( taskWoken != pdFALSE )

But L-task keeps executing and H-task never resumes from xQueueReceive.

With the debugger I see that H-task is marked as “executing” but the breakpoint after xQueueReceive never hits.

Any ideas?

Shouldn’t H-task be activated after the next vNonPreemptiveTick?

Thanks in advance.

rtel wrote on Sunday, March 29, 2015:

Its been a long time since I did anything on an ARM7, but I don’t recognise portYIELD_FROM_ISR() as a macro that was ever provided for ARM7 ports (might be wrong). I think in ARM7 ports it is called portEND_SWITCHING_ISR().

Also in ARM7 ports you need to provide an assembly wrapper around interrupt service routines, are you doing that? Please post the code you are using the enter the interrupt.


petergreen0815 wrote on Sunday, March 29, 2015:

You are my hero! :wink:

Of course I had no wrapper. I wasn’t aware that I need one.

After reading the word “wrapper” I examined the ARM7_LPC2368_Rowley demo and found in EMAC_isr.c the pattern for it.

Knowing the answer I also found the proper documentation here:

Thank you very much!