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.

BQ25703A: Detection of plugged state in OTG mode

Part Number: BQ25703A


Hi,

without using OTG I was able to detect the insertion of a USB power supply by monitoring the CHRG_OK pin or the AC_STAT bit.

After activating OTG when no power supply is present  (CHRG_OK got low) this does not work anymore.

CHRG_OK pin is always low, and AC_STAT is always high?

How is that supposed to work?

Greets,

Joerg

  • Hi Jeorg,

    The OTG operation can be enabled if the conditions are valid:

    • Valid battery voltage is set REG0x05/04()
    • OTG output voltage is set in REG0x07/06() and output current is set in REG0x09/08()
    • EN_OTG pin is HIGH and REG0x35[4] = 1
    • VBUS is below VVBUS_UVLO
    • 10 ms after the above conditions are valid, converter starts and VBUS ramps up to target voltage. CHRG_OK pin goes HIGH if REG0x01[3] = 1.

    See the final bullet point, you need to set REG0x01[3]=1 (OTG_ON_ CHRGOK). Description:
    Drive CHRG_OK to HIGH when the device is in OTG mode. 0b: Disable 1b: Enable

    Thanks,

    Khalid

  • Hi Khalid,

    thanks for your answer.

    I have no problem to activate the OTG mode.

    Bit REG0x01[3] is low.

    The problem is that I'm not able to detect the plug in of the power device.

    I plug out the USB stick and plug in the power supply but the CHRG_OK pin stays low and the AC_STAT bit stays high.

    So how do I know to leave the OTG mode and start charging again?

    Greets,

  • Hi Joerg,

    Thanks for the clarification. In my previous response, I mentioned REG0x01[3]=1 (OTG_ON_ CHRGOK). This allows the CHRG_OK bit to indicate OTG is enabled, however, it doesn't have anything to do with detection of Adapter plug in while OTG is already enabled.

    Unfortunately, the charger has no way to know that a new voltage is applied at VBUS when OTG is also providing a voltage at VBUS, unless the applied voltage is higher than the OVP threshold in OTG mode.  The host software is responsible for controlling the transition from OTG back to charging.

    Thanks,
    Khalid