I am using the LPC845 I2C port to read my EEPROM. In order to read I must first write a data pointer to the device, so my transaction consists of a write, followed by a repeated start, followed by a read. However, after issuing the repeated start, the LPC845 outputs the EEPROM address and read bit, followed by 8 additional clocks. I found a post that is similar but it did not solve my problem.
I am using an interrupt based driver.
Do you know about this issue, what causes it, and how to fix it?
Edit: It also turns out that the 8 extra clocks appear immediately after the next start command even if preceded by a stop. So it is not just repeated starts, its any start following the first one.
Solved! Go to Solution.
I figured this out. Refer to the attached code file. When reading from I2C on the LPC845 it is not necessary to bump the "continue" flag to read the first byte after giving the address and r/w flag (which is 1 in the case of a read). Just wait for "pending" status and then you can read the first byte. After that you must bump the "continue" flag on subsequent reads. This was not clear from the LPC845 User Manual, but anyway, that's it.
I figured this out. Refer to the attached code file. When reading from I2C on the LPC845 it is not necessary to bump the "continue" flag to read the first byte after giving the address and r/w flag (which is 1 in the case of a read). Just wait for "pending" status and then you can read the first byte. After that you must bump the "continue" flag on subsequent reads. This was not clear from the LPC845 User Manual, but anyway, that's it.
The LPC845 generates the clock, not the EEPROM. The 8 extra clocks are coming from the LPC845.
Hello @kk7xo
Please check how to read EEPROM data from EEPROM datasheet.
From your screenshot, only after Read command, there is 8 extra clocks.
BR
Alice
The 8 extra clocks are being produced by the LPC845 which is operating as the I2C master. The I2C master produces all of the clocks. The EEPROM does not produce any clocks.
It could be caused by "10 bit" addressing, which is a feature of the LPC845 I2C module. However, I do not see a way to either enable or disable "10 bit" addressing. My EEPROM requires "8 bit" addressing, which is the normal behavior for I2C.
Maybe you should have an engineer that is familiar with the LPC845 I2C module look at this.