FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2006 Threads] Problem: LPC2136and multiple interruptsPosted by Nobody/Anonymous on November 19, 2006 Hello!
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:
//Timer1 static void Timer1_Isr(void) __attribute__((naked));
void InitIRQTimer() { VICIntSelect &= ~(TIMER1_VIC_CHANNEL_BIT); VICIntEnable |= TIMER1_VIC_CHANNEL_BIT; VICVectAddr3 = (unsigned int) &Timer1_Isr; VICVectCntl3 = TIMER1_VIC_CHANNEL | TIMER1_VIC_ENABLE; }
static void Timer1_Isr(void) {
portSAVE_CONTEXT();
T1IR |= T1IR_MR0; // clear TI . . . VICVectAddr = 0; portRESTORE_CONTEXT(); }
//Now i2c void I2C0_Isr(void) __attribute__ ((naked)); static void I2C_Init(void) { //I2C-Init 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) { portSAVE_CONTEXT(); I2C0CONCLR = 0x08; // clear SI . . . VICVectAddr = 0; portRESTORE_CONTEXT(); }
I have a feeling, I forgot something.. :)
I'm thankful for any hint!
Thanks, Th.Kusch
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|