Quality RTOS & Embedded Software

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




Homepage | FAQ

FreeRTOS FAQ - ISR's

This is a subsection of the full FAQ

Can a context switch occur within an ISR?
How do I write an RTOS safe ISR?
Can interrupts be nested?

FAQ Top



Can a context switch occur within an ISR?

Yes. Each RTOS port provides a macro to request a context switch from within an ISR. The name of the macro is dependent on the port (for historic reasons). It will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR. Refer to the documentation page for the port being used.

Every official port comes with a demo application that demonstrates context switching from an ISR.



How do I write an RTOS safe ISR?

That is very dependent on the microcontroller and tool chain port of FreeRTOS being used. Refere to the documentation page and demo application for the RTOS port being used.



Can interrupts be nested?

It depends on the port. See the description of the configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY configuration parameters for additional information.








[ 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