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


Interrupt Support for NIOS

Posted by Robert Klem on August 3, 2010
I am attempting to get a simple interrupt to work. The FreeRTOS Reference Manual gives a great example of how to set configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY in a system where 0 is the lowest priority interrupt. However, there is a footnote about how care must be taken due to the fact that some processors use 0 as the lowest priority and others use 0 as the highest priority. Unfortunately I fall into the "other" category where there is no example. I could not find any parameter that would indicate if 0 was high or low priority, so I am now confused on how this all works.

Is there someone who can explain 1) how freeRTOS determines if 0 is high or low priority, and 2) how the configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY should be set having one group of interrupts be maskable and another set be unmaskable for 0 being high priority (like the example in the reference manual for 0 being low)?


RE: Interrupt Support for NIOS

Posted by Richard Damon on August 3, 2010
It has been awhile since I have done work on Nios, but perhaps I can give some general help. FreeRTOS does not derermine if 0 is high or low priority, and most of the kernel doesn't really care. The port files MAY need to know how the hardware/software treats the priorities if the port wishes to allow nesting of interrupts (if this is supported by the processor). A basic requirement for the port is that interrupts that interact with FreeRTOS (through FromISR functions) should not nest, and that these interrupts should not occur inside of critical sections. This is set with the configMAX_SYSCALL_INTERRUPT_PRIORITY, and interrupts with a priority of this or "lower" can interact with FreeRTOS and those of priority "above" this do not, and may be nested. If a port does not support nesting, then these parameters are pretty much meaningless. One reason for a port not to support nesting is if the basic hardware doesn't support it, or doesn't support it well. Looking at the portmacro.h file for Nios, it doesn't use these macros so I suspect the Nios Processor doesn't support nesting (or at least not in a way easy to work with FreeRTOS).

[ 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