Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

IRQ and xTaskResumeFromISR

Posted 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 xTaskResumeFromISR

Posted 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS