IRQ and xTaskResumeFromISR
I’m using ARM7 based board without Interrupt Controller like on LPCxxx.
I have only one task suspends yourself:
task1( void *pvParameters ){
int i;
for (;;){
i++;
vTaskSuspend(NULL);
i++;
}
}
I have declaration of IRQ handler (not ISR task) like below:
_interruptHandler() __attribute__ ((naked))
_interruptHandler(){
portENTER_SWITCHING_ISR();
if( IRQ1 ){
eventTeack++;
xYieldReq=xTaskResumeFromISR(xhTask1);
if(xYieldReq== pdTRUE)
vTaskSwitchContext();
}
portEXIT_SWITCHING_ISR();
}
I’ve tried use portEXIT_SWITCHING_ISR but these macrosses are only for ISR’s task.
How exactli can I perform resumming within IRQ hendler?
IRQ and xTaskResumeFromISR
Should this not be:
_interruptHandler() __attribute__ ((naked))
_interruptHandler(){
portENTER_SWITCHING_ISR();
int xYieldReq = 0;
if( IRQ1 ){
eventTeack++;
xYieldReq=xTaskResumeFromISR(xhTask1);
}
portEXIT_SWITCHING_ISR(xYieldReq);
}
xYieldReq is a parameter to portEXIT_SWITCHING_ISR.
Alternatively just save the context of the task on entry to the IRQ using portSAVE_CONTEXT and restore it on exit using portRESTORE_CONTEXT, then call vTaskSwitchContext as you were.