Quality RTOS & Embedded Software

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



Posted by ramun on May 26, 2011

I ran into a problem concerning the configMAX_SYSCALL_INTERRUPT_PRIORITY value.
I'm using the EFM32 Cortex-M3 port of FreeRTOS V6.1.0. Since I didn't want to care about the interrupt priorities, I thought it would be a good idea to set configMAX_SYSCALL_INTERRUPT_PRIORITY to 0 (the highest interrupt priority). But this leads to a sporadically crashing OS. Further examination of the problem showed that the configMAX_SYSCALL_INTERRUPT_PRIORITY is used in the function vPortSetInterruptMask to set the BASEPRI register. But I think this has not the intended effect since setting BASEPRI to zero actually enables all interrupts (disables the BASEPRI functionality) instead of disabling them.
Can anyone confirm this concern?


Posted by MEdwards on May 26, 2011
Yes I can confirm it. Don't set it to 0 because zero has a special meaning in basepri, as you found out yourself.


Posted by ramun on May 27, 2011
Ok, thanks a lot!


Posted by Richard Walters on July 18, 2012
I just got bitten by not configuring the priorities of my interrupts, so I did some research to understand ARM Cortex interrupt priorities and how they affect FreeRTOS.

One thing I came across while researching was this tidbit int he ARM v7-M architecture reference manual: "When (BASEPRI) is cleared to 0, it has no effect on the priority. A non-zero value will act as a priority mask, the execution priority when the priority defined by the BASEPRI is higher than the current executing priority".

So basically, you're right, setting configMAX_SYSCALL_INTERRUPT_PRIORITY to zero actually prevents any interrupts from being "masked", so none of your interrupt handlers can safely call into any FreeRTOS APIs.


Posted by Richard on July 19, 2012
Here are some relevant links on the FreeRTOS web site:

http://www.freertos.org/RTOS-Cortex-M3-M4.html (see very last sentence).


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

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

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

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

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

Cadence Tensilica Cortes

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