We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I was able to configure and work with I2C interface in LPC2368 using Polling Method.There was no problem with the polling method.
Now i am forced to use I2C using Interrupt Routines for Real-Time Applications.I configured the following registers for enabling ISR , when i tried simulating the program , the VIC Address, VIC Enable Bit and VIC Priority are setting up properly.But the function where i used ISR is not invoking , i was not able to solve out where is the problem.Is there any more additional registers i should configure other than these ?
VICIntSelect = 0; // for selecting IRQ VICIntEnable = (1<<19); //Enabling I2C1 VICVectCntl0 = 0x01; // High Priority VICVectAddr0 = (unsigned long)I2C_IRQHandler;
__irq void I2C_IRQHandler() { .... ......
...... VICVectAddr = 0x00; //Acknowledge Interrupt }
I am not getting the IRQ Function invoked at all.
Can any one help me out on this Issue as soon as possible ?
Regards, Samjith
VICIntSelect = 0; // incorrect VICIntEnable = (1<<19); // correct VICVectCntl0 = 0x01; // incorrect VICVectAddr0 = (unsigned long)I2C_IRQHandler; // incorrect
Read the Manual for Table 82. Interrupt sources bit allocation table
VICIntSelect = 0; // for selecting IRQ VICIntEnable = (1<<19); //Enabling I2C1 VICVectCntl19 = 0x01; // High Priority VICVectAddr19 = (unsigned long)I2C_IRQHandler;
Is this Configuration Correct ?? But its still not Working Sir.
www.standardics.nxp.com/.../code.bundle.lpc23xx.lpc24xx.uvision.zip
Please download the [code.bundle.lpc23xx.lpc24xx.uvision.zip] from the above url.
Check the folders named [Common] and [I2C], for IRQ, you should see the file [irq.c].
Sir,
Even I have followed the Sample Coding which you have sent , Still Interrupt Function is not invoking,but when I tried using simulation , all the necessary Interrupt Flags are getting set.