Quality RTOS & Embedded Software

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




Loading

Cortex-M3/4 BASEPRI masks interrupts logically AT (??) and below priority 0

Posted by mpittelkau on January 4, 2015

This is in reference to article titled “Critical Sections” the FreeRTOS web page titled “Running the RTOS on a ARM Cortex-M Core” located at

http://www.freertos.org/RTOS-Cortex-M3-M4.html

There it says:

"BASEPRI is a bit mask. Setting BASEPRI to a value masks all interrupts that have a priority at and (logically) below that value. It is therefore not possible to use BASEPRI to mask interrupts that have a priority of 0."

Thee second statement does not seem to follow precisely from the first. The first part of this paragraph says “priority AT” and the second part says “not possible . . . to mask interrupts that have a priority of 0.” However, the article says priority 0 cannot be masked , so saying “priority at” seems inconsistent. If the article is consistent, a priority of 0 is a logical priority and therefore the highest priority, which is not supposed to be maskable. Is it that the first part the paragraph is true except for logical priority 0?

Please clarify or correct that paragraph for me.


Cortex-M3/4 BASEPRI masks interrupts logically AT (??) and below priority 0

Posted by rtel on January 4, 2015

If you want definitive information on how Cortex-M cores work then you will have to refer to the hardware manuals provided by ARM.

As for the paragraph you highlight, I'm struggling to see an inconsistency, so don't fully understand the point you are making.

BASEPRI is a bit mask. Setting BASEPRI to a value masks all interrupts that have a priority at and (logically) below that value.

So, ignoring the confusing bit shifts for a moment and just dealing with logical priorities, if the lowest possible priority is 15 and you set BASEPRI to 10, then "at or logically below" would mean priorities 10, 11, 12, 13, 14 and 15 would be masked. Priority 0, being the highest priority would not be masked.

It is therefore not possible to use BASEPRI to mask interrupts that have a priority of 0

You can write bits into BASEPRI to mask interrupt priorities. As priority 0 does not have any bits set, you cannot write bits into BASEPRI to mask it.

Regards.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists