Hi
I am working with LPC51U68. I am operating this device in I2C Slave mode. The I2C->STAT register allows me to readout the current state the I2C interface is in. There are three states available:
1. STAT[10:9] = SLVSTATE = 0x0 --> Slave address
2. STAT[10:9] = SLVSTATE = 0x1 --> Slvae receive
3. STAT[10:9] = SLVSTATE = 0x2 --> Slave transmit
I would like to know what is the read / write bit in the "Slave address" state (i.e. SLVSTATE = 0x0).
Is there a way to get this information in this state?
I would like to ACK/NAK the address depending on Read/Write and internal buffer availability.
Currently my implementation can only ACK/NACK in the other two slave states which means I am already in the data part of the I2C protocol and the address has already been ACKed.
I want to ACK/NACK the "Slave address" based on the information contained in the read/write bit.
Many thanks
Dani
Hello Daniel,
How about read the bit 0 of Slave Data register (SLVDAT) ?
BR
Alice