This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Send only slave address on i2c (no data)

Other Parts Discussed in Thread: TM4C1231H6PGE

I have tm4C1231h6pge, and an m24xx eeprom connected each other through i2c.

To determinate if the eeprom is busy, the slave address must be send, and the ACK/NAK bit must be read.

How can I send only slave address on i2c, and no data?

best regards

max

  • Hi Max,

    The behavior as mentioned in M24XX data sheet is not supported by Tiva I2C. However you can still do it by SW. In the code, you can ask for a Master Receive operation. If the I2C Slave NACK's then the master will terminate the transaction immediately on NACK. If the I2C Slave ACK's then the slave will send one data byte which can be flushed from the I2CMDR by a simple CPU read and a proper transaction initiated after that for Read or Write

    e.g.

    I2C master sends ADDR + R/W=1

    if NACK try again

    If ACK then wait for stop condition, Read the I2CMDR and junk the data

    Now issue a proper data write or read from I2C Master

    Regards

    Amit Ashara

  • Hi Amit

    Unfortunately to determine if the eeprom is busy is necessary a write operation (R/W=0).

    Maybe sending 2 bytes is not a problem, but to do this I have another problem, described here.

    best regards

    max

  • Hi Max,

    You can use the WC control to cause the Slave to NAK the Data and use the DATANACK MCS Status to terminate the operation and begin a fresh Write or Read operation

    Regards

    Amit Ashara

  • The WC pin is fixed to GND. However the EEprom will nak if it is busy.

    best regards

    Max

  • Hello Max,

    If that is the case then the two scenarios as I see

    1. If NACK then the data byte will be not be sent and STOP will be issued

    2. If ACK then the data byte will be sent as Address and STOP will terminate it before the second ADDR byte is sent. A new transfer can be done to write to slave device

    In both cases you should be able to program/read the slave device.

    Regards

    Amit Ashara