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.

TPS65987D: I2C1 IRQ not toggling

Part Number: TPS65987D

Hello,

I would like to get I2C1 interrupts to toggle, but it seems like the I2C1_IRQ line is continuously held low. I checked the line with a scope with my board as well as the evaluation board and the result was the same. 

With my code I tried to clear all interrupts by writing the mask in register 0x16 to register 0x18, at the beginning and that didn't have an effect either. 

If I poll the IntEvent1 (0x14) register then I do see event bits being set when I plug in a device on the other end of the USBC cable. 

Is there anything I am missing? Any help is much appreciated! I have attached the project file that I am using. 

My setup is as follows:

* Using an external SPI flash to store the patch bundle config

* SPI_MISO is 1, and ADCIN1 is 0.24

Kind regards,

Chamira Perera. tps65987ddh_advanced.pjt

  • Hello,

    The IRQ line will be held low as long as an IRQ event is active. The typical flow for an I2C_IRQ event is as follows 

    1. Set relevant IRQ events within the application configuration tool and flash updated project to external EEPROM
    2. See that IRQ is triggered low
    3. Read register 0x14 to see what interrupt event was triggered 
    4. Write the value read from register 0x14 to 0x18. This clears the IRQ events and should have the IRQ line transition back to high

    If you are still seeing IRQ being held low after following the above steps, make sure that you do not have IRQ events set in the 0x17 register. This will also trigger the IRQ line, and if you are never clearing those relevant registers, the IRQ line will remain held low

  • Hi Adam,

    Thank you for your reply and your valuable suggestions. Unfortunately the I2C1_IRQ line is still being held low. Following is what I did:

    1. Read register 0x14 and wrote it to 0x18. Read back register 0x14 and confirmed all bits are zero. 
    2. Cleared all bits in register 0x17 to zero
    3. Read register 0x15 and wrote it to 0x19. Read back register 0x15 and confirmed all bits are zero. 

    Also, not sure if this an issue with the Application Customization Tool but when I unticked all the check boxes in Interrupt Mask for I2C2, program the new binary, read register 0x17 I noticed that a bit that I never set in the UI was set in the register. Its because of this behavior I cleared register 0x17 in above step 2. 

    As a last resort I tried to clear register 0x16 (this is not something I really want to do), and despite that, the I2C1_IRQ line is still held low. 

    In light of these findings, is there potentially anything else that I am missing? Any help is always much appreciated! 

    Kind regards,

    Chamira. 

  • Hi Chamira,

    Do you have an external 10K pullup resistor connected to the IRQ pin and LDO_3V3?

  • Hi Adam,

    Thank you for your reply. We have a pullup on I2C1_IRQ which is 4K7. Do you think this is not sufficient? I've attached the relevant portion of the schematic to the reply.

    Kind regards,

    Chamira. 

  • Hello Chamira,

    Based on the schematic you shared, you do not have any pullups on I2C1_SCL or I2C1_SDA. Are you communicated to the PD controller only on I2C1? If so do you have a pullup elsewhere on your schematic?

    If you do, would you be able to share with me the I2C transactions being sent between the devices using a logic analyzer of some sort

  • Hi Adam,

    Sorry for not being thorough, the design has two other I2C slaves on the I2C bus and the pullups for the I2C lines are on a different page of the schematic. The design is using 4K7 pullups for the I2C bus. 

    I presently don't have a logic analyzer with me and due to the current situation I'm working from home. When I get a chance to go into the office, I'll grab an analyzer and send you a trace. 

    Dumb question, do you see this behaviour on your end with the evaluation board? If not are you able to send me a config which I can try on the evaluation board on my end?

    Thanks.

    Chamira. 

  • No this is not expected behavior on the evaluation board. 

    You can use any of the default configurations generated by the GUI to test/evaluate on the EVM

    Will wait for your response with a capture of the I2C communication 

  • Hi Adam,

    Thank you for your reply. In my previous post I had indicated that if I use my existing configuration on the EVM the IRQ line doesn't toggle. This is why I was wondering if you had a configuration where the IRQ line was toggling as expected so I could try it out on my end. 

    Sorry I still haven't been able to capture the I2C trace. 

    Kind regards,

    Chamira. 

  • Hello Chamira,

    Here is a project file you can load onto your device. The only IRQ event programmed is the plug insert and removal IRQ event. So you should only see the IRQ line toggle low after a device has been connected. Let me know if IRQ is high when the device is initially powered on 

    Test_project.pjt

  • Hi Adam,

    Thank you so much for sending through the project file. I was able to confirm with the EVK that the IRQ line was toggling when I flashed the binary from your project file. This helped me validate that I wasn't doing something wrong in the project file. 

    When I modified my project to have the exact same interrupt mask for I2C1 and on my design the IRQ line was still not toggling. I ended up finding the root cause and the firmware in my design was holding the IRQ line low (the design was ported from an older design and it had some legacy code). 

    So after fixing the firmware in my design the I2C1_IRQ line is toggling as expected.

    I'll close this case. 

    Kind regards,

    Chamira.