Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner