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.

RTOS/AWR1642: Read Issue from I2C Slave

Part Number: AWR1642

Tool/software: TI-RTOS

Hi, 

I tested the i2c slave reading by modifying the i2c slave test program in sdk_02_00_00_04.

 The i2c slave test program sequence that modified the i2c slave test program in s2k_02_00_00_04.

  :  I2CSlave_open ->  I2CSlave_read -> I2CSlave_close Repeat.

Logs after #define DebugP_LOG_ENABLED  1

Like the log above, the 0xaa of first data is good. 

However, the second read interrupt was not generated when MCU sent the second data.

0xBB of the second data is received with the register of ICDRR below, but no interrupt occurred.

1. First data waveform: normal operation

   

2. Second data waveform: abnormal operation

3. Fist Data and Second data waveform (The second data was sent after about 25mS)

  

4. Total waveform (After about 600ms, the Busy state is release)

Would you please check the i2c slave mode ?

Regards

JP

  • We have contacted the test team and will provide you feedback in a few days

    thank you
    Cesar
  • Hi Cesar
    Also, If the master sends the second data after about 1.5 seconds ~ 2.0 seconds , the second data can be received normally.

    Regards,
    JP
  • Hi,

    I have received some feedback from the team

    There are some fixes for I2C driver in the SDK 3.2 that was released a few days ago.

    Can you please try the driver in this release?

    thank you
    Cesar
  • Hi Cesar,
    I have compared I2C Slave driver in SDK 3.2 and SDK 2.0.
    The i2c master mode(i2c_master.c)has changed slightly, but the i2c slave mode(i2c_slave.c, I2CSlave.c) has not changed at all.
    Please review again.
    Thank you

    Regards,
    JP
  • Thank you

    We are looking into it

    Cesar
  • HI,

    I checked with the development team

    The slave mode was only API tested.

    Why do you close the slave in between the 2 reads?

    Just from looking at the logs: the read ready interrupt was not received.

    Do you get a addressed as slave in between the 2 data transfers?
    The receive ready flag(I2C_INT_MASK_RECV_READY) is set only when the addressed as slave interrupt(I2C_IVR_INTCODE_AAS) is a received.

    If we didn’t get a addressed as slave interrupt, the receive ready flag will not be set and hence the receive interrupt(I2C_IVR_INTCODE_RRDY) will not be received.

    As an experiment they can set the I2C_INT_MASK_RECV_READY flag in I2CSlave_setupTransfer() function. Make the highlighted changes.

    if (readWriteFlag == 1)
    {
    I2CIntEnable(ptrHwCfg->ptrI2cBase,
    I2C_INT_MASK_ADRR_SLAVE | I2C_INT_MASK_STOP_CONDITION | I2C_INT_MASK_TRANSMIT_READY | I2C_INT_MASK_NO_ACK);
    }
    else
    {
    I2CIntEnable(ptrHwCfg->ptrI2cBase,
    I2C_INT_MASK_ADRR_SLAVE | I2C_INT_MASK_STOP_CONDITION | I2C_INT_MASK_RECV_READY | I2C_INT_MASK_NO_ACK);
    }

    Thank you
    Cesar