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.
Using the Keil LPC 2129 EVB, I set up the I2C port in Slave Mode and talk to a master device on the bus. I notice that every 500 or so transfers, when the Keil EVB recieves: [SLA][W] it Nacks the byte instead of Acking it. I don't understand how it could be Nacking, since when it recieves its Slave Address and Write bit, it goes into a case where I only ACK. An excerpt of my code is as follows:
void i2c_isr(void) __irq { unsigned char status; status = I2STAT & 0xF8; switch(status) { // SLA+W has been recieved and ACK has been returned //Arbitration Lost in SLA+R/W as //Arbitration Lost in SLA+R/W case 0x60: case 0x68: case 0x70: case 0x78: I2CONCLR = 0x20; //STA=0 I2CONSET = 0x44; //Set ACK to enable Slave Rx Mode I2CONCLR = 0x08; // SI = 0 break; ...