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.

Problem during the first ic2 read operation

Other Parts Discussed in Thread: PCF8575

Hi all,

I'm debuging the i2c communication in my board. To do read and write operations I'm using an I/O Expander, PCF8575.

After enabling the i2c, if my first operation is read in I/O Expander I get an error and read operation isn't done. If a try to do same operation I get an error again. But I'm able to do a write operation, and after this it's possible to do the read operations, without erros.

I read in some code examples that sometimes we can have this problem. What is the great solution to this problem?

Regards,

  • Hello Murilo,

    Sometimes in this device there can be a power-on reset issue. If the device is not powered off long enough, the power off voltage is not low enough, or the rise time on power on is not fast enough the POR can be incomplete. This can cause the internal registers of the device to be set to random values, and can cause issues in initial operation. 

    What does your power-up sequence look like?

  • Hello Hattie,

    I will see with the hardware team the power-up sequence. But it's possible to occur POR incomplete during the operation of my system. Assuming that this problem can appear and will appear, a POR incomplete, what I have to do to stabilize my system?

     

    Regards,

     

     

     

  • My initialization is:

    #define ORION_I2C_PERIPH              (SYSCTL_PERIPH_I2C0)

    #define ORION_I2C_MASTER_BASE         (I2C0_MASTER_BASE)

    #define ORION_I2C_INT                 (INT_I2C0)

     // Enable the I2C peripheral.
     SysCtlPeripheralEnable(ORION_I2C_PERIPH);

     // Initialize the I2C master.
     I2CMasterInitExpClk(ORION_I2C_MASTER_BASE, SysCtlClockGet(), 0);
     I2CMasterEnable(ORION_I2C_MASTER_BASE);

     I2CMasterIntEnable(ORION_I2C_MASTER_BASE);

     IntEnable(ORION_I2C_INT);

     

    Regards,