AnsweredAssumed Answered

A NACK by the SR1 register and a ACK by the logic analyzer.

Question asked by Leek1001 on Jan 6, 2012
Latest reply on Jan 10, 2012 by Leek1001
Hello I've got an issue with I²C.

My problem:
on the logic analyzer I receive an ACK and by the SR1 register a NACK

my checking code:
/* Clearing SR1 and SR2 */
iTemp = I2C2->SR1;
if((I2C2->SR1 & 0x0002) == 0x0002)
    iTemp = I2C2->SR2;

/* Send Register adres */
I2C_SendData(I2C2, 0x0A);

/* Wait until ADDR is set */
Timeout = 0xFFFF;
while((I2C2->SR1 & 0x0002) != 0x0002){
    if (Timeout-- == 0)
    return Error;
now I got stuck at the while loop because there is no ACK received.

The weird thing is: the SR1 register receives a ACK when I call the slave with his slaveaddress.