Hi all,
I have used the following code for I2C intializing, the vector
no 9, i dont receive i2c interrupt(IRQ) after setting the start bit.
if I configure the interrupt as FIQ I receive the interrupt.
#define VIC_ENABLE (1<<5)
#define VIC_BIT(b) (1<<b)
#define VIC_I2C 9
void i2c_init(void)
{
I2C_I2CONCLR =0xFF ;
/**I2C GPIO INIT***/
PCB_PINSEL0 &= ~0x000000F0;
PCB_PINSEL0 |= 0x00000050;
/*Setting the LPC2104 slave address*/
I2C_I2ADR = LPC2104_ADDR | 0x01;
I2C_I2SCLL = 80;
I2C_I2SCLH = 80;
/*i2c interrupt flag is cleared and i2c is enabled*/
I2C_I2CONSET = 0x40;
/*enabling i2c interrupt,make I2C interrupt as IRQ*/
VICIntSelect &= ~VIC_BIT(VIC_I2C);
VICVectAddr0 =(unsigned int)lpci2c_isr;
VICVectCntl0 = VIC_ENABLE | VIC_I2C;
VICIntEnable = VIC_BIT(VIC_I2C);
}
thanks
vijayMessage
not receving i2c interrupt
2005-02-24 by vijayasarathy T
Attachments
- No local attachments were found for this message.