LPC2138 I2C

Jun 18, 2008 3 Replies

Hi,



I am still using the LPC2138 ;). Now I have a problem with I2C. When I try to send some bytes to an EEPROM device, the following happens:


- I2C start condition is made



- interrupt is generated



- I2C address is sent



- EEPROM device gives an ACK



And now nothing happens. If I look at the I2C bus state, the microcontroller accepted the ACK. However, no new interrupt is given due to a bus state change. The SI bit is high in the control register.



Should I continuously receive interrupts when the SI bit is set? If so, maybe at a higher level the interrupt is turned off. Any other ideas?



TIA, Frank


It is working now. The main problem was in my generic interrupt handling code. After changing the generic interrupt handling, everything worked fine.

Thanks for the follow-up. I assume it was a fairly simple software bug, not some lurking inconsistency in the way the LPC2138 works?

Eric

Yes, it was a software bug in the code I use. The LPC2138 was working correctly.

Frank

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required