Quality RTOS & Embedded Software

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


LPC236X nested interrupts

Posted by GSMMAN on March 28, 2011
Hello All

Can anyone give me some simple snipets code with FreeRtos and a couple of nested interrupts on LPC236x and IAR EWB?

I'm not sure if FreeRTOS supposrts nested interrupt for LPC2000 devices.


RE: LPC236X nested interrupts

Posted by Dave on March 28, 2011
Nesting interrupts on ARM7 is horrendous. NXP have an application note telling you how to do it, but if you can, write your interrupts to be very quick by deferring the real interrupt processing to a high priority task.

RE: LPC236X nested interrupts

Posted by GSMMAN on March 28, 2011
Thank's for your reply DaveDoors!
well my problem is that I have an interrupt timer @1ms always on, seems that the uart interrupt is delaying the timer interrupt. My idea was to nest the uart interrupt. I'm trying to not wrap the uart interrupt as freertos says and declare the function with the keywords of IAR as: __irq __nested.
In this way seems to me that the timer interrupt should be able to nest the uart isr.

I'll try tommorrow at work and se if it work. If you wish some feedback on it. Just tell.


RE: LPC236X nested interrupts

Posted by GSMMAN on March 28, 2011
this is from freertos website:

Interrupt service routines
An interrupt service routine that does not cause a context switch has no special requirements and can be written as per the normal IAR syntax. For example:

static __arm __irq void vAnISR( void )
/* ISR C code goes here. */

/* End the interrupt in the VIC. */
VICVectAddr = 0;

Often you will require an interrupt service routine to cause a context switch. For example a serial port character being received may wake a high priority task that was blocked waiting for the character. If the ISR interrupted a lower priority task then it should return immediately to the woken task. Limitations in the IAR inline assembler necessitate such interrupt service routines include an assembly file wrapper.

at this point i can declare the uartisr as
static __arm __irq __nested void uartISR( void )

and this should enable the nesting of the uart isr.
Of course in uart ISR no RTOS calling.
Is there something wrong?

[ 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