TCA9539: I2C Clock Changing

Part Number: TCA9539
Other Parts Discussed in Thread: ADS7128, TCAL9539

Hi, 

I have two TI's I2C devices (TCA9539, and ADS7128) that are placed on the same I2C bus (I2CA) pin 98 & 99 of the TMS320F28375 micro controller. The TCA9539 can support the clock frequency of 400KhZ and it has an address of 0x74 and the ADS7128 can support up to 1Mhz and it has an address of 0x17. I have a very tight loop of 1ms requirement and software needs to do lots of thing in that loop. In order to meet this requirement I need to set the I2C clock to 1Mhz when the software read the ADS7128 and then switch to 400K to read the TCA9539. The clock switching back and forth goes on for ever. I listed the pseudocode below for your reference. 

Just to let you know, I have used the mentioned skim and coded the software. The software has been running without any issues for the passed five days without any issues but I like to hear from you by coding this way I am not violating anything with respect to TCA9539 datasheet. 


Is it okay to communicate with the ADS7128 with the speed of 1Mhz while TCA9539 is placed in the same bus that can only support 400K? One more thing is that We are at the point that we are not able to change the hardware like replacing the TCA9539 with TCAL9539 (Which can support 1Mhz). Please advise...


main()
{
...
...

Setting the I2C clock to 400k
Init(ADS7128)
Init(TCA9539)
...
Setting the I2C clock to 1Mhz

for(;;)
{
  Reading the ADS7128.
...
Setting the I2C clock to 100Kz

Reading the TCA9539.

Setting the I2C clock to 1Mhz
...

}


}

  • Hi Mehran, 

    The TCA9539 stills sees the 1 MHz clock. 

    The TCA9539 was designed for clock speeds up to 400kHz. 

    The state machine may or may not recognize an I2C event for the 1 MHz clock speed. The device functionality and reliability across PVT has not been addressed for 1 MHz.

    In short, it is a risk. Since we can't change anything I think we should focus on the start and stop conditions. For example during a 1 MHz transaction, the TCA9539 may be able to successfully process the start, it may only catch 5 clock pulses, then it sees a stop condition. As long as the TCA9539 sees a start and stop condition, the TCA9539 should reset its state machine back to the start. The question is how do you guarantee a 400kHz rated device to see a start and stop conditions 100% of the time during FM+

    is there any way you can design your firmware to meet the minimum specs for setup/hold for start and stop conditions for the TCA9539?

    Also in your for loop, you can write and read the TCA9539 at 400kHz instead of 100kHz to save time. 

    for(;;)
    {
      Reading the ADS7128.
    ...
    Setting the I2C clock to 100Kz (run at 400kHz instead)

    Reading the TCA9539.

    Setting the I2C clock to 1Mhz
    ...

    }

    Regards,

    Tyler

  • Hi Tyler,

    Thanks so much for your fast reply. Just to let you know, in my pseudocode that i submitted, I am actually switching the clock to 400K but I have a type of 100K; nevertheless, as you mentioned it is a big risk and we cannot afford this risk. We may delay this project for a few weeks or so in order to resolve this matter appropriately. I think that we will replace the TCA9539 chip with TCAL9539 that can support 1Mhz.

    As I reviewed the data sheet of TCAL9539, I noticed this chip is a pin-to-pin replacement of TCA9539. Do you foresee any issue with replacing this chip with TCAL9539?