2 Replies Latest reply on Jan 31, 2020 12:44 PM by JoLu_3455101

    How to detect and cancel a dead battery/reverse power condition after a power disruption?





      We are using CYPD3171 and our application is typically the power provider (5V charging to the connected phone). However, due to power disruption, the VBUS voltage level may drop to 3.5V (for example) which stops charging current to the phone. What happens next is that the phone tries to provide power BACK to our CYPD3171 , which I am guessing due to Rd-DB (dead battery).



      Even when VBUS power (provider side) is back to normal (~5V), the phone is still providing power. So it is now stuck in this condition where the phone is not getting charged.

      a) How do I detect this "dead battery" condition in the firmware code?

      b) How do I reverse this condition because the preference is that the CYPD3171 is the power provider?


      I've tried to check if dpm_stat->cur_port_role == PRT_ROLE_SINK so I can request a DPM_CMD_SEND_PR_SWAP, but I think CYPD3171 still thinks it is the power provider (PRT_ROLE_SOURCE) from the original time when the voltage was still good at 5V.


      Interesting fact is that if power to CYPD3171 is turned off completely and then back on (instead of dropping to 3.5V), CYPD3171 resets and provides power again with no problem. So this problem only occurs if the voltage level drops too low to stop providing charging current to the phone, but not too low to reset CYPD3171.