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


Problem: LPC2136and multiple interrupts

Posted by Nobody/Anonymous on November 19, 2006

I have a problem using multiple IRQ..
Port: ARM7 (LPC2136)
Devel.suite: Cross Works 1.6

I'm using two IRQs: Timer1, running with 22kHz and I2C (slave) called
every 50ms, receiving 3bytes and seding 1byte.
When testing with only one int, everything works fine. As soon as both
are used, the I2C-IRQ stops working after a short period of time (approx.
10-50 ints). The SI-Flag in I2C0STAT is set, but the handler is not called.

Here the relevant code snipplets:

static void Timer1_Isr(void) __attribute__((naked));

void InitIRQTimer()
VICVectAddr3 = (unsigned int) &Timer1_Isr;

static void Timer1_Isr(void)


T1IR |= T1IR_MR0; // clear TI
VICVectAddr = 0;

//Now i2c
void I2C0_Isr(void) __attribute__ ((naked));
static void I2C_Init(void)
PINSEL0 |= 0x50; // P0.3 = SDA, P0.2 = SCL
I2C0ADR = I2C_SLAVE_ADDR<<1; // set I2C slave address
I2C0CONSET = 0x44; // enable I2C hardwar and set AA (ack)
VICVectAddr4 = (unsigned int) &I2C0_Isr;
VICVectCntl4 = 0x29; // Channel1 on Source#9 ... enabled
VICIntEnable |= 0x200; // 9th bit is the I2C

void I2C0_Isr(void)
I2C0CONCLR = 0x08; // clear SI
VICVectAddr = 0;

I have a feeling, I forgot something.. :)

I'm thankful for any hint!


[ 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