LPC51U68 I2C Slave STAT[10:9] = SLVSTATE = 0x0 Slave address

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC51U68 I2C Slave STAT[10:9] = SLVSTATE = 0x0 Slave address

240 Views
danielgull
Contributor IV

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

Labels (1)
0 Kudos
1 Reply

196 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Daniel,

How about read the bit 0 of Slave Data register (SLVDAT) ?

BR

Alice

0 Kudos