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.

AM5716: I2C Master couldn't get bus busy for Transfer and send data at ack bit timing

Part Number: AM5716

Hi Team,

The customer observed a strange behavior during AM5716 IC2 master send slave address.  I2C5 master couldn't get bus busy for Transfer and send data at ack bit timing as below. It's happened 1 time /  2 to 3 hours.

I2C5 communicate with externa RTC.  I2C5 module stay at Line15 which bus busy in the attached code.

Do you have any idea for this issue? 

/* Set i2c slave address */
I2CMasterSlaveAddrSet( baseAddress, slaveAddress );
I2CFIFOClear(baseAddress, I2C_TX_MODE);
I2CFIFOClear(baseAddress, I2C_RX_MODE);
/*Clear all interrupt status*/
I2CMasterIntClearEx(baseAddress, I2C_INT_ALL);
/* Set data count */
I2CSetDataCount( baseAddress, size+1 );
/*  Configure i2c as master-transmitter and to generate stop condition */
I2CMasterControl(baseAddress, I2C_CFG_MST_TX);
/* generate start */
I2CMasterStart(baseAddress);
/* wait for bus busy */
while(I2CMasterBusBusy(hwAttrs->baseAddr)==0)
{
}
// data TX
for (i = 0; i < (size+1); i++){
    /*Wait for transmit interrupt to occur*/
    while (I2CMasterIntRawStatusEx(baseAddress,
               I2C_INT_TRANSMIT_READY) != I2C_INT_TRANSMIT_READY) {
     }
    /* Send the data */
    I2CMasterDataPut(baseAddress, txBuf[i] );

    /*Disable transmit ready and stop condition interrupt*/
    I2CMasterIntClearEx(baseAddress, I2C_INT_TRANSMIT_READY);
}
/* generate stop when requested */
I2CMasterStop(baseAddress);

/*Clear data buffer length*/
I2CSetDataCount(baseAddress, 0);

Thanks and Best regards,

 Kuerbis

  • Hi  Kuerbis,

    A few queries:

    1) Can you please share what is the clock frequency you are using for I2C?
    2) Can you please explain what is your application doing?
    3) Are you using i2c driver for the transaction?

    Regards,
    Parth

  • I am a member of the questioner.

    Parth

    Answer questions 1) to 3).


    1) Can you please share what is the clock frequency you are using for I2C?
    Answer:100k Hz

    2) The AGV application calls the API to send to the external IC.
    Answer:The AGV application calls the API to send to the external IC.
           Send in 20ms cycle
           A high priority Bios task is running,Access to I2C is not executed

    3) You are using Driver I2C_v1.c provided by TI.
    Answer:You are using Driver I2C_v1.c provided by TI.

    in trouble.
    Answer please.

  • Hi,

    Can you try introducing some delay between each I2C access to your external IC and see if there is any change in behavior?

    Regards,
    Parth

  • Hi Parth,

    What do you mean introducing some delay between each I2C access?

    Are you asking to increase a interval?  more than 20ms cycle?

    Thanks and Best regards,

     Kuerbis

  • Hey,

    Sorry, I did not notice the delay, 20ms should be good enough.
    Can you try reducing clock frequency to 10Khz and see if there is a change in behavior?

    Regards,
    Parth

  • Hi Parth,

    I would like you to tell me what the propose to investigate 10Khz.

    Can you tell me what you are concerned about and what you want to see at 10khz?

    Thanks and Best regards,

     Kuerbis

     

     

     

  • Hi Kuerbis,

    Some i2c devices does not work stable with higher frequency. Just want to rule out if that it is not the issue here.

    Regards,
    Parth

  • Hi Parth,

    10Khz is no issue during 24 hours.

    But the customer observed an issue at 50Khz.

    What is a next step?

    Thanks and Best regards,

     Kuerbis

     

  • Hi,

    10Khz is no issue during 24 hours.

    This means that i2c slave is working fine with lower clock frequencies.

    Can you please some details on the i2c device you are using: 
    1) What is the device you are using?
    2) What is the maximum frequency supported by the device?
    3) Is there any specific I2C sequence required to communicate with the device?

    Regards,
    Parth

  • I am a member of the questioner.

    Parth

    Answer questions about the device we are using.

    Can you please some details on the i2c device you are using:
    1) What is the device you are using?
    Answer:
    Model: RX8130CE
    Manufacturer: EPSON
    Japanese link: support.epson.biz/.../doc_check.php
    English link: support.epson.biz/.../doc_check.php


    2) What is the maximum frequency supported by the device?
    Answer:
    In Standard-Mode, it supports up to 100kHz.
    In Fast-Mode, it supports up to 400kHz.
    We are using at 100kHz.

    3) Is there any specific I2C sequence required to communicate with the device?
    Answer:
    I don't think it's a special I2C sequence.
    The detailed telegram sequence is listed below.

    Japanese link: ttps: //support.epson.biz/td/api/doc_check.php? dl = app_RX8130CE & lang = ja
    English link: support.epson.biz/.../doc_check.php

  • We’ll need more details on the system

    1) The application you are running, is it a standalone application? If not, is there a way that we can test the application in a standalone environment? This would help us isolate if anything else is interfering here?

    2) Is there any other device connected on the same i2c bus? If yes, please provide details on those.

    3) Also, please provide details on the overall system as well. Any details on any other application that might impact this application will be helpful.

    Regards,
    Parth

  • Hi Parth,

    Here is an answers for your questions.

    A1) This is a standalone application.  The serial cable is only connected as a debug port.  The task is running more than one task than the one that is experiencing this behavior, but no external connections are possible. Only one task is using I2C.

    A2) Nothing else is connected except a debug cable.

    A3) There is no interference with other applications because there is no external connection.

    Thanks and Best regards,

     Kuerbis

     

  • Hi Parth,

    Here is additional information.

    The customer has to reset the master manually.

    When the problem occurs, a recovery process is added with a manual reset of I2C. (When I2C is always in a Busy state) .

     

    Thanks and Best regards,

     Kuerbis 

     

  • Hi,

    This is a standalone application.  The serial cable is only connected as a debug port.  The task is running more than one task than the one that is experiencing this behavior, but no external connections are possible. Only one task is using I2C.

    Can you please provide details on the other tasks that are running? What interfaces these tasks are accessing? And what interrupts are configured in the system. 

    Also, I see that the device supports up to 400kHz in fast mode. Can you try your application at maximum frequency and see the behavior of the issue?

    Regards,
    Parth