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.

TWL4030 charging using a dedicated USB charger

I want to  a platform over the USB OTG connection using both a PC that enumerates and a dedicated USB charger that does not enumerate. The PC enumerate to a 500mA supply and the current limit of 4030 is set appropriately. The dedicated USB charger does not enumerate and therefore does not set the current limit of the 4030.

Does the 4030 automatically detect the presence of a dedicated USB charger? If so how and what register can be read to determine that a dedicated USB charger is connected? Or is there a need for software control to determine the presence of a dedicated USB charger?

  • Hi,

    The 4030 is capable of automatically detecting the charger. For that you will have to perform the following steps:
    1.Enable all the resources of USB.
    2.Enabled Carkit and also enabled the required interrupts ( including the CHARGER_EN bit of the CARKIT_SM_1_INT_EN)
    3.By default Carkit state machine sets the disconnected bit in the status register and we need to clear this bit so that the state machine could go ahead. Reading the CARKIT_SM_1_INT_LATCH register which will clear the disconnected status bit.
    4. When the detection is complete, the required charger interrupt status could be read from the CARKIT_SM_1_INT_STS register.
             CARKIT_SM_1_INT_STS -> if 0x10 => Charger detection 
           CARKIT_SM_1_INT_STS -> if 0x08 => HOST CHARGER detection. 
    Hope this helps.
    Thanks and regards,
    Jigar

     

  • Jigar,

    Thank you for the information. Can you be more specific for step 1? What do you mean by all resources of the USB?

    Regards,

    Greg.

  • Hi,

    He meant all internal USB LDOs - 1.5V, 1.8V and 3.1V

     

    Regards,

    Gandhar