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: UFP DFP event does not change GPIO pin state

Part Number: TPS65987D

I am trying to detect whether the USB device plugged in, is a peripheral device or a host. In order to do that I have mapped a "UFP DFP Event" to GPIO pin 6. I'd expect according to the documentation, in case a peripheral or  a host is connected, that the pin signal would change states (at this point I don't care which is which, as long as long as I observe a change). In my case this doesn't happen; instead the GPIO signal remains high, no matter any device connection (or removal). I tested whether I could pull it down by enabling the Internal Pull Down, and indeed this seems to work as expected.

Is there something I am doing wrong or have misunderstood here?

Attached you may find both the project file as well as a screenshot from the Application Customization Tool.

 project_1.pjt

  • Hello Thomas,

    I'm looking into this issue and will provide you with an update after I gather more information.

    Best Regards,

    Christian.

  • Hello Thomas,

    In the project file you sent me, for Data Swap Strategy you selected "No Preference, Rejects All Swaps".  You need to change this to one of the other three options. With this option selected you are not able to swap data roles, so this is why you are seeing this behavior.

    Best Regards,

    Christian.

  • Hi Christian,

    many thanks for your time and effort. Indeed, you have a point; so I tried your suggestion either by using "No preference, Supports All Swaps" to both of them, or setting an explicit preference, but without any success. In the simplest scenario, I'd like to connect a regular USB stick and see the signal changing.

    Thank you again,

    Thomas

  • Hello Thomas,

    Are you using an EVM or are you using your own design?

    How are you testing this?

    I used the project file you sent me and TPS65987DHEVM. I changed  "No Preference, Rejects All Swaps" to "No preference, Supports All Swaps". After I flashed it I went into debug mode using the Application Customization Tool, and I sent a 4CC Command to swap to DFP and swap to UFP ( depending on what state it starts out in). I was able to see GPIO6 go from high to low and low to high. I recommend trying this test to see if it works on your end.

    Best Regards,

    Christian.

  • Hello Christian,

    the good news is that I managed to have it working properly. Eventually, the issue was a combination of your first remark, together with a flaky probing with the logic analyzer (that was my fault; the pads are extremely small :( ). I flashed the project file first on the EVM and then on our custom design and in both cases, it is now working as expected.

    Again, many thanks for your time, I appreciate it.

    Cheers,

    Thomas