Noticed when single stepping through I2C code on a Kinetis KL03 processor connected to an EEPROM that as soon as the debugger executed the line to read the I2C data buffer the hardware continued to read byte after byte from the EEPROM even though the debugger had stopped.
During the I2C transaction a START is sent by the Master KL03 followed by the Address of the Slave EEPROM and the Internal Register Address to be read from the EEPROM. A Restart is then sent followed by the Address of the Slave EEPROM. But this time with the READ bit set. This is followed by a "dummy" read to clear the I2C read buffer of the just sent Address of the Slave EEPROM. This triggers a byte read from the EEPROM. Prior to this the ACK bit in the KL03 is set such that after the EEPROM sends data it will continue sending data. (If the ACK bit in the KL03 is not set the EEPROM would not send any additional data.) If the KL03 program continues to execute code would detect when the current transaction is done then clears the ACK bit such that after the next read the EEPROM will stop sending data to the KL03.
However, if we stop the code right after the 1st read of the I2C receive buffer the KL03 hardware will continue to clock out byte after byte from the EEPROM. Despite the fact the debugger has stopped.
It was expected that the KL03 would not clock out any additional data from the EEPROM until the next read of the I2C receive buffer.
I am not sure if this is a hardware bug, the expected behavior or if there is a configuration problem. Does anyone else know?