Quality RTOS & Embedded Software

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


Supervisor Stack usage in Interrupt Service Routine on Cortex A9

Posted by pixt on March 6, 2017


I am using a Xilinx Zynq-7000 (ARM Cortex A9) with FreeRTOS. I recently had the problem that my interrupt service routine wrote into memory regions it was not supposed to due to a stack overflow. The problem was not solved by only increasing the IRQ stack size in the linker script. I found out that the ISR was using the supervisor stack. After increasing the size of the supervisor stack the stack overflow disappeared. Can you explain to me why the ISR uses the supervisor stack and why it was neccessary to increase the size of the supervisor stack? Thank you.

Best regards, pixt

Supervisor Stack usage in Interrupt Service Routine on Cortex A9

Posted by richarddamon on March 6, 2017

The ARM architecture uses multiple stacks for different hardware levels of operation (traps, interrupts[fast, nested], system software interrupt, user programs), so you need to make room in the stack that will be used by that operation.On ARM architectures, FreeRTOS triggers a supervisor interrupt to do the context switch between tasks.

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


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


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