PMIC (Power Management IC)

Misc operation control reg

This is register REG07. It forces D+/D- (DPDM) detection, allows the BATFET (battery FET) to be forced off for shipping mode, controls whether the safety timer is slowed during input DPM or thermal regulation, and masks the CHRG_FAULT and BAT_FAULT interrupts.

Devices using the PM_BAT module, including the Muon and M.2 breakout board, do not use DPDM in the bq24195 to control maximum power used from USB. The Muon uses a separate USB-C charge controller chip to negotiate current and voltage.

readOpControlRegister()

byte readOpControlRegister();

Returns the raw value of REG07.

enableDPDM()

bool enableDPDM(void);

Forces the PMIC to run D+/D- (DPDM) detection (DPDM_EN, REG07 bit 7 = 1) to determine the current capability of the USB source. This bit automatically clears itself when detection completes; poll isInDPDM() to wait for that to happen.

disableDPDM()

bool disableDPDM(void);

Clears the force-DPDM-detection bit. Since the bit clears itself automatically when detection completes, this is rarely needed.

isInDPDM()

bool isInDPDM();

Returns true while the PMIC is actively performing D+/D- detection (DPDM_EN, REG07 bit 7). Used after enableDPDM(), or before entering shipping mode, to wait until detection has completed before proceeding — see the shipping mode example in the power supply guide.

enableBATFET()

bool enableBATFET(void);

Turns the BATFET back on (BATFET_Disable = 0, REG07 bit 5), reconnecting the battery to the system. This is the default state.

disableBATFET()

bool disableBATFET(void);

Forces the BATFET off (BATFET_Disable = 1, REG07 bit 5), disconnecting the battery from the system entirely, so there is no path to charge or discharge it. This is the basis of shipping mode on bq24195 devices. If no other power source is present, the device will power off immediately when this is called; the only way to bring it back is to apply external power (USB or VIN).

isBATFETEnabled()

bool isBATFETEnabled();

Returns true if the BATFET is enabled (BATFET_Disable = 0), meaning the battery is connected to the system.

safetyTimer()

bool safetyTimer();

Sets the 2x safety timer slowdown bit (TMR2X_EN, REG07 bit 6). When set (the default), the fast-charge safety timer counts at half the normal rate while the PMIC is in input DPM (dynamic power management) or thermal regulation, since the actual charge current — and therefore the time to charge — is reduced in those conditions. This is unrelated to enableSafetyTimer()/disableSafetyTimer(), which enable or disable the safety timer entirely.

enableChargeFaultINT()

bool enableChargeFaultINT();

Enables the PMIC's INT pin to be asserted when a charge fault occurs (INT_MASK[1] = 1, REG07 bit 1). This is the default. The interrupt pin used is set by interruptPin() in the Power Manager API (PM_INT on most devices).

disableChargeFaultINT()

bool disableChargeFaultINT();

Disables the INT pin assertion on charge faults.

enableBatFaultINT()

bool enableBatFaultINT();

Enables the PMIC's INT pin to be asserted when a battery fault occurs (INT_MASK[0] = 1, REG07 bit 0). This is the default.

disableBatFaultINT()

bool disableBatFaultINT();

Disables the INT pin assertion on battery faults.