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: Dead Battery Transition to Normal mode

Part Number: TPS65988
Other Parts Discussed in Thread: TPS65987

I have a system that needs to be capable in a dead battery state and a normal state. the system is patched at boot by a micro over i2c , when the system is booted normally with a battery everything works. Then i can boot the system off dead battery and works as expected. Once i reboot back off battery and plug in the phone the phone goes through a pd hard reset (per a pd sniffer) and then takes about 30 seconds for it to react to the connection and then begin to work like it was in normal mode. I have tried clearing the dead battery flag but i do not see it even set.

  • Hi Carlson,

    Please double check your VIN_3V3 and LDO_3V3 signals on a scope. You could also try the 4CC Gaid after the connection. 

    Thank you,

    Hari

  • So attached in the zip are a few things to help with resolve this issue.

    normal op is when the system is powered off an external source

    phone is a Samsung s9 and s20, both have the same behavior. snapshots and is using the s20.

    Problem: when the Dead Battery Transition to Normal mode it can take to up to 3 minutes to enumerate after connection. after those three minutes then the system function normal unplug and plug and the system operates normal

    solutions tried: clearing the dead battery flag, warm reset, pd hard reset. the clear dead battery flag and the pd hard reset are rejected and the warm reset seems to halt the pd controller and then once it finishes the reboot goes back to the same state. after the allotted time of 30 seconds to 3 minutes the system functions normally

    Scope Images of the ldo_3v3 and 3v3_vin and PP_HV during dead battery and normal op

    I attached the project file that I used to generate the binary to program the pd controller. the pd controller is programed over i2c with a microcontroller. the pd controller is setup for infinite wait and BP_ECWait_Internal.

    attached are some pd negotiation captures. I don't understand what is going on the dead battery scenario there are so many transactions it seems repetitive. On the transition from dead battery to normal mode I see a hard reset is sent.

    snapshots using config tool of the different scenarios. I don’t understand why the pd controller is in UFP in register (0x28) when in dead battery mode. the microcontroller programs with the same binary file every time the system boots.

    overall, I am looking for a system that can boot into DRP with UFP initialized by default in both scenarios. but when in dead battery the phone is the source and in normal mode the phone will charge. Also, if the system boots from dead battery and a source is connected the system should be able to switch and start charging the phone without the phone needing to remunerate the usb bus. currently since it boots into UFP config in 0x28 the system will not allow to switch power sources and it needs to switch to DRP which causes a remuneration is there a way around this.

    Any help will be appreciated 

    pd_testing_captures.zip

  • Hi Carlson,

    Thank you for the details and the files. I will take a look into them but it might take some time.

    However, in the meantime, please take a look at the TPS65987/88 Technical Reference Manual from the product page and you could also try the Barrel Jack GPIO Event trigger. This should clear the dead battery flag and set it to your configurations after the reset. You can see this and the description in the manual. Another workaround you can also try is the 4CC command "Gaid" after clearing the dead battery flag.

    Thank you,

    Hari

  • I’ll take a Deaper dive into that reference manual. I haven’t seen anything in there yet. I have tried dói no the Gaid. It doesn’t seem to effect how long it takes for it to come back. I just see when I send the gaid the phone begins searching for a Ufp or dfp. 

    I’ll have to look into that barrel jack gpio

    thanks let me know what else you find as you search through that data and if you need anything let me know. 

  • Nothing stood out to me in the tech reference manual as things to try. The Barrel Jack detection I looked into a little but it doesn't make sense to implement because My microcontroller is monitoring the input power and if it detects input power from external source then it can run the proper commands to the swap over the power role. Currently when I try to swap the power roles I'm having issues, I believe its because the unit boots up into a UFP role instead of dual role. so for me to swap power roles I need to change to a dual role and this causes a remuneration on the phone which I am trying to avoid.

  • Hi Carlson, 

    I think the main issue then is just that since the PD controller boots up in dead battery mode, it will show up in UFP just due to default configurations and then will attempt to program itself via your configurations from Host/EEPROM. Once this happens, the PD works based on your settings as expected. During dead battery conditions, until VIN_3V3 is present, it will take some time to get the configurations and then to reestablish a connection with the phone. If you have the PD log, I can take a look through it also.

    Thank you,

    Hari