FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2006 Threads] IRQ and xTaskResumeFromISRPosted by Nobody/Anonymous on August 21, 2006 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?
RE: IRQ and xTaskResumeFromISRPosted by Nobody/Anonymous on August 21, 2006 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|