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

ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by tobias89 on August 28, 2014

Hi, I am using ARM Cortex M0 with FreeRTOS v7.1.0. I am aware that any interrupt service routine that calls ISR safe FreeRTOS API functions (such as xQueueSendToBackFromISR()) must have logical priority equal or below configMAXSYSCALLINTERRUPT_PRIORITY (defined in FreeRTOSConfig.h), which is, in our case, defined as 5 shifted by 6 bits, which results in 1.

However, this project was before some time, when I wasn't aware of that. I used NVICEnableIRQ() to enable certain interrupt routine without setting its priority, which leads to setting it to 0 (higher logical priority than configMAXSYSCALLINTERRUPTPRIORITY).

The thing that bothers me is that it works flawlessly to this day, even though it shouldn't (judging by the all warnings). I will correct that in the new version of project, but can somebody please explain why does it work and in which case it wouldn't work and why?

Thank you!


ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by rtel on August 28, 2014

You will be fine doing that on an M0 part. It is the ARM Cortex-M3 and M4F ports (as well as some non ARM ports) where the rule you mention above applies. Even then, if you were to get it wrong, it would not fail immediately, only when a set of events happened at the same time. The newer M3 and M4F ports (yours is a little older) have lots of asserts to help people track down such issues.

Regards.


ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by tobias89 on August 29, 2014

Thank you for the answer, that's interesting. Could you please explain a bit why the rule doesn't apply on M0? It supports interrupt nesting, as well as the M3.

Regards!


ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by rtel on August 29, 2014

The M0 does not have the basepri register, so there is no clean single instruction way of masking only a subset of interrupt priorities.

Regards.


ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by alainm3 on August 29, 2014

Please, can you point me to somewhere to study this further?

It realy sounds very important but I really didn't understand this as well as I should. And CM0 is going to be an important part of our lifes, do we like it or not...

Thanks, Alain

Em 29-08-2014 06:55, Real Time Engineers ltd. escreveu: > > The M0 does not have the basepri register, so there is no clean single > instruction way of masking only a subset of interrupt priorities. > > Regards. > > ------------------------------------------------------------------------ > > ISR with lower priority than configMAXSYSCALLINTERRUPT_PRIORITY > https://sourceforge.net/p/freertos/discussion/382005/thread/ec13cb4f/?limit=25#5387 > > ------------------------------------------------------------------------ > > Sent from sourceforge.net because you indicated interest in > https://sourceforge.net/p/freertos/discussion/382005/ > https://sourceforge.net/p/freertos/discussion/382005 > > To unsubscribe from further messages, please visit > https://sourceforge.net/auth/subscriptions/ > https://sourceforge.net/auth/subscriptions >

Attachments

alternate (1733 bytes)

ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by davedoors on August 29, 2014

ARM are the guardians of the documentation on their own chips. Start here http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0432c/index.html (which I found using Google)


ISR with lower priority than configMAX_SYSCALL_INTERRUPT_PRIORITY

Posted by tobias89 on August 30, 2014

This is also a good book for understanding CM0 http://caxapa.ru/thumbs/424855/TheDefinitiveGuidetotheARMCortex-M.pdf


[ 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