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.

TPS65988: Attach, Detach events for legacy phones

Part Number: TPS65988

Hello,

What is the most reliable way the TPS65988 can tell me if a phone is plugged in?  USB-C to USB-C device attachment is working well using only register 0x1A because the basic c-c cable doesn't do anything to the CC lines so the plug detect bit works.  However, USB C to micro USB and USB C to Lightning cables both pull down the CC line, triggering the plug detect bit.  Then when I plug in a legacy device to either cable I see no change in register 1A , 3F or the others I've looked at.  I've also dumped the full register snapshot and compared the empty cable to when a legacy device is attached and I see no real difference between the tps65988 device registers in those two conditions. 

Are there other registers I can look at or will I need to resort to measuring vbus current to determine if a device is attached and charging?  Unfortunately I have to report (attached & charging) and (attached & not charging) as separate states, so I'm using a 5mA Vbus current threshold to determine if a device is attached and charging or attached and not charging.  I was hoping I could lean on "Charger Detect Status" but like I said - the empty cables report the same register values as when I add on a legacy charging device.

I'm open to other suggestions and appreciate your help!

Adam

  • Adam,

    The Status register (0x1A) should be updated.

    I will have to look into why this isn't happening.

    Regards,

    Chuck

  • Chuck, thanks for the quick response.  I will continue investigating my project, board and the eval boards I have against the cables and devices I have to see if I missed something that's preventing the status register from being updated.  I'm using the TI app gui as well as my own processor to read the registers for posterity. 

    What specifically are you expecting will change when going from empty lightning to a legacy apple device and same question for the micro usb cable compared with a legacy device, or any device?  That may help me iron out the problem.

  • Adam,

    Can you attach you project configuration to this thread?  

    It is possible that you do not have charger emulation turned on and this is why you are not connecting to the legacy apple devices.

  • Hi Chuck,

    Here is my project file.  I've tried to remove features we don't want.  Our customer wants the port to be a USB-PD compliant 45W dedicated charging port.  I am able to charge legacy devices, but I am unable to detect when those devices are plugged in.  The problem I'm working toward resolving is determining if someone has attached a phone.  Customer needs to determine if the device is attached to the port but not charging, attached to the port and charging, and if the device has been removed.  

    If you see anything in my project file that goes against this goal please let me know.  Thank you for taking the time to review it.

    AdamAG_TPS65988_EVMV1.pjt

  • Adam,

    I will be able to look at this later  today or early tomorrow and get back to you.

    Regards,

    Chuck

  • Adam,

    I am attaching a project file that turns on Data Contact detection which will allow you to determine if a device is attached but not charging.

    Does your customer have a MCU in the system, because to do what you want to do, we will have to use the host interface?

    I have turned on the I2C1 IRQs that will toggle the I2C1_IRQ line any time a connection update occurs that you will need to read a status register to determine what is happening.

    Here is a a link to the host interface document:  TPS65987DDH and TPS65988DH Host Interface Technical Reference Manual (Rev. B)

    You will need to read the following registers:

    0x0F Power Status (This will tell you almost everything that you want to know after a connection occurs)

    0x35 Active Contract RDO (This is the current source contract)

    By reading these 2 registers, you can determine everything that you are attempting to address.

    Regards,

    Chuck

  • Hi Chuck,

    I don't see an attachment.  Can you reattach it or send it to me via email?

    Thanks for your help,

    Adam

  • Adam,

    I apologize, here is the file.

    AG_TPS65988_EVMV1_TI_EDIT.pjt