Skip to content

bug(power): external charger limited to 500mA instead of higher IINLIM #187

@cptkoolbeenz

Description

@cptkoolbeenz

Description

When connected to an external charger (wall adapter), the BQ24297 only draws 500mA input current instead of the expected higher limit (up to 2A/3A depending on charger type).

Current Behavior

  • USB PC port: 500mA — correct (matches USB 2.0 spec with OTG HIGH)
  • External charger: 500mA — should be higher based on charger capability

Expected Behavior

The BQ24297 DPDM detection (Table 9-1 in datasheet) should classify:

  • USB host (SDP) + OTG HIGH → 500mA
  • Charging port (CDP/DCP) → 3A
  • Non-standard adapter → 1A/2A depending on D+/D- divider

The charger should be detected as a charging port or non-standard adapter and IINLIM set accordingly.

Investigation Notes

  • AutoSetILim() currently sets IINLIM to 2000mA for all vBusStat cases, so the register write should allow higher current
  • The BQ24297 resets IINLIM on every new VBUS plug-in event based on DPDM detection result
  • Possible causes:
    • DPDM detection may be misclassifying the charger as USB host due to D+/D- line state
    • The PIC32 USB PHY may be interfering with D+/D- lines during DPDM detection
    • Timing: USB device attach (1000ms delay) may occur before or during DPDM, affecting D+/D- state
    • The AutoSetILim write may be happening before DPDM completes, then DPDM overwrites it
  • Datasheet reference: datasheets/bq24297.pdf, sections 9.3.1.3.3 through 9.3.1.3.7

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions