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.

BQ24195: D+/D- detection not working

Part Number: BQ24195

Hi, 

We are currently developing a hand-held device that needs to be charged by either wall charger and USB complaint ports (2.0 and 3.0). The wall charger works really well, no issues at all. However, when we plug the device into a standard 2.0 or 3.0 USB, it tries to pull 1.5 A and, therefore, does not properly do the charging port detection through the D+/D-. We have the BQ24195EVM-193 and our own design (similar schematic, different layout) but does not work in either of them. 

Any help would be much appreciated. 

Thanks in advance. 

Best Regards,

Victor

  • Hello Victor,

    If the input current detection results in a 1.5A current limit, this means the device detected a DCP or CDP. On your testing, was the expectation to detect SDP (500mA input current limit)? Is the USB port used for testing SDP or CDP?

    Couple additional questions:

    • On the bq24195EVM-193, what's the configuration for the JP1, JP2, and JP6 jumpers?
    • What's the state of the OTG pin?
    • Is there any USB switch along the D+/D- path?

  • Hi Fernando,

    I initially powered the device through a powered USB hub, giving out 1.5 A (which I believe is right). However, when the device is powered through a standard USB 2.0 or 3.0 from the laptop (which I believe it should give a maximum of 500 mA and 900 mA respectively) the output is still 1.5 A. I believe the USB is SDP, however, I am actually not 100% sure...can a laptop's usb be a CDP? This is a concern as it can end up blowing up the USB

    1) On the bq24195EVM-193 I have JP1, JP2, JP9 and JP6 linked.
    2) State of the OTG pin is LOW ( I have tried with and without linking JP4)
    3) No, goes straight to the laptop's USB.

    Thanks.

    BR, Victor
  • Hello Victor,

    Laptops may have CDP ports that allow data to be transfer while allowing higher power options. CDP ports typically have a little lighting bolt icon near them. I would verify the type of USB port being used for testing.

    On the bq24195EVM, if an external USB is used to evaluate D+/D- detection, JP2, JP6, JP9 need to be floating. If installed, the D+/D- lines will be shorted together to ground, resulting always in a DCP detection, most likely why you are always seeing 1.5A input current. I recommend uninstalling these jumpers and trying again the detection.

    Another thing to clarify is that, even though the device detects a 1.5A input current limit, based on the type of input detected; the host has the option to change the input current limit via I2C after the detection is complete.
  • Morning Fernando, 

    I am using a standard USB 3.0 (blue connector) from a different laptop. Now, I also have the JP2, JP6, JP9 floating as suggested. With the described set-up...

         I can NOT get the battery charging at all when the battery is in the battery holder before and I connect the charging cable to the USB port. However, if I connect the cable to the USB port without a battery (in the battery holder) a fault is triggered (LED flashing, which is okay), then I plug in the battery on the battery holder and it starts charging but with a really low current, 100mA ( I would expect 150/900 mA as per USB 3.0 standard).

    Thanks again for your help. 

    Best Regards,

    Victor Claver

  • Victor,

    Couple things might be happening:

    1. You most likely have the OTG pin pulled low and the device is now detecting a 100mA SDP instead of 500mA SDP. As detailed on Table 2 of the bq24195 datasheet on section 8.3.1.3.4, the logic state of the OTG pin during input current detection is considered during input current detection. Try pulling high the OTG pin (you can tie it to SYS via a 10k) and verify the input current limit set over I2C.

    2. Battery voltage is too low and the 100mA you are observing is the trickle charge current which is fixed to 100mA. This is for when VBAT is less than the precharge threshold (2V).

    3. If the battery voltage is less than 2.2V and charge is enabled, SYS will also be less than 2.2V. If that's the case, the system will limit the input current limit to 100mA as part of its soft-start sequence (sectionn 8.3.1.4 of the datasheet). Once the SYS voltage rises above 2.2V, the device begins using the expected input current limit.

    4. If there's a load on SYS, the device might be in input current limit or input voltage limit with a 100mA input current limit. The bq24195 will prioritize the system load and reduce charge current to support the system.
  • Hi Fernando, 

    Thanks for you message.

    With the suggested set-up (JP6, JP2, JP9 and JP4 floating) I don't get the evaluation board to charge the battery at all.

    JP6 needs to be linked in order to charge the battery from a laptop's usb (does not need to when using a wall adapter). Regarding the points in your message:  

    1. Changing the value of the OTG pin does not make any difference to the charging current (using the software I double checked that the current limits are all well over 100 mA)

    2. Battery voltage is around 3.78V before starting to charge, which I think it would be in the constant current charge phase. 

    3. Battery voltage is > 2.2V and also the SYS has been disconnected from the load and same results ( it either charges at lower or higher current as expected, but the negotiation does not seem to happen)

    4. Does not apply (no load). 

    Again, many thanks for your time and support. 

    Best Regards,

    Victor Claver

  • Hello Victor, 

    Can you please share the register settings during your testing (when connected to the USB on the laptop)? A screenshot of the GUI also works.

    If it works when using a wall adapter, does charging work with a different USB port? Is JP5 installed on the EVM?

  • Hi Fernando, 

    Please, find the status registers attached. Charging it using a wall adapter works fine, but it does not when using a laptop's USB port. Tried with JP5 installed and uninstalled. 

    Thanks.

    Victor 

  • Hello Victor,

    From the screenshot provided, we can tell the device is in input DPM regulation REG08[3], either input current or input voltage.

    Since the I2C register reads 1.5A, the ILIM resistor must be checked to verify it's not setting a lower current limit, since the device uses the lowest between ILIM register and external resistor.

    If input current is not the issue, input voltage limit might be the problem. Perhaps the cable impedance is too high and it's causing the voltage at VBUS to droop or the USB port being used can't support the load. The device will reduce the charge current to prevent the input voltage from dropping below the input voltage limit setting(4.36V) in this case.Please measure the voltage at VBUS and verify if this is the case. Another test would be to reduce the input voltage limit setting to see if the charge current increases slightly.

  • Hi Fernando,

    This is my current set-up and the results I obtained:

    - SETUP 1 -> BQ24195EVM-193: JP6, JP2, JP9, JP7, JP5, JP4, JP8 and JP12 all linked, Ilim (Resistor): 1.4 A.
    - Wall adapter (2A charger): 1.41 A (In DPM Regulation -> Current related)
    - Laptop's USB Port (USB 2.0): 1.02 A (In DPM Regulation -> Voltage related)

    - SETUP 2 -> BQ24195EVM-193: JP6 Floating and JP2, JP9, JP7, JP5, JP4, JP8 and JP12 all linked, Ilim (Resistor): 1.4 A.
    - Wall adapter (2A charger): 1.41 A (In DPM Regulation)
    - Laptop's USB Port (USB 2.0): 0.08 A (In DPM Regulation)

    Yes, indeed, the device is in input DPM regulation when charging from the laptop's USB port, however, I believe this shouldn't happen if the negotiation between the laptop's USB and the BQ24195 was okay?

    If I understand correctly, this DPM shouldn't happen if the USB negotiation was correct and I do not understand why this does not work. Even though the DPM regulation may be okay in the short-term, I 'd rather have the USB detecting the maximum capability of the USB charging port for a long-term solution.

    Many thanks again for your time.

    Best Regards,
    Victor Claver

  • Hello Victor,

    I tried your setup on the EVM as was able to duplicate the behavior, here's what happening:

    • If JP6 is linked, the device will always detect DCP. Charging should start and device will be in DPM.
    • If JP6 is not linked, the device will perform the detection based on the type of USB port connected:
      • If a wall adapter is used, the device detects DCP with 1.5A input current limit.
      • If connected to a USB 2.0 slot, the device does detect a USB host of 100mA (since OTG is tied to ground.

    However, on this last step, there is an additional caveat to it. The bq24195 supports BC1.2 Charging spec, which includes a requirement where if the USB host used is detected as a 100mA and VBAT is above the bat-good threshold, VBATGD, the device goes into HIZ (section 8.3.1.3.5 of the datasheet). In this case, the battery voltage is ~3.8V, well above the battery good threshold. If a USB 2.0 slot is connected, the device will detect a 100mA USB host and the device will go into HIZ. I verified this on the EVM, that's why no charging is observed with the USB slot and charging happens when using the wall adapter.

    Tying the OTG pin high before plugging the input resulted in a 500mA USB slot and charging began as expected. I tried this by toggling the "OTG Low" bit on the bq2419x GUI and tying TP14 to an external pull-up.

    This means the D+/D- detection is working as expected.

  • Hi Fernando, 

    Thank you for response. Unfortunately, I haven't been able to replicate that behaviour on my EVM, I believe something is wrong with that particular EVM as it behaves erratically. So, I moved into my proprietary board and set it up as you suggested, it seems to work absolutely fine, detects the DCP as well as the USB 2.0 port type (I will test it with different port types in the next days though). 

    Thanks again. 

    Best Regards,

    Victor Claver