Hi,
I have a issue with getting the MP2760 in the lowest power mode (28-33uA). I measure about 800uA. I have a 2-cell Li-ion battery connected. Below my schematics:
When my device wakes up from sleep mode I execute MP2760::Init()
bool MPS2760::Init() {
if ( !_i2c.isDeviceReady(_I2C_Address, 3, I2C_TIMEOUT_MS)) {
return false;
}
// Configure GPIO pins as Inputs
// Both ACOK and INT are open-drain outputs on the MP2760,
// pulled up externally. Configure MCU side as Input.
_acokPin.Configure(GPIOInterface::Mode::Input, GPIOInterface::Pull::None);
_intPin.Configure(GPIOInterface::Mode::InterruptRisingFalling, GPIOInterface::Pull::None);
bool success = true;
// 1. Disable Watchdog timer for simplicity during initialization
success &= ReadModifyWriteRegister(
MPS2760Registers::REG12H_CONFIG_4,
0, // Value 00 for disabled
MPS2760Registers::REG12H_WTD_MASK
);
// 2. Set the number of cells
uint16_t cell_code = (static_cast<uint16_t>(_Number_Of_Cells - 1) << MPS2760Registers::REG10H_BAT_NUM_POS);
success &= ReadModifyWriteRegister(
MPS2760Registers::REG10H_CONFIG_2,
cell_code,
MPS2760Registers::REG10H_BAT_NUM_MASK
);
// 3. Set Battery Regulation Voltage (REG15H)
// Defaulting to 4.2V per cell.
uint32_t targetVoltage = _Number_Of_Cells * 4200;
success &= SetBatteryFullVoltage(targetVoltage);
// 4. Set System Minimum Voltage (REG07H)
uint32_t minSysVoltage = 3600;
if (_Number_Of_Cells == 2) minSysVoltage = 6400;
else if (_Number_Of_Cells == 3) minSysVoltage = 9200;
else if (_Number_Of_Cells == 4) minSysVoltage = 12000;
success &= SetVsysMin(minSysVoltage);
// 5. Set Input Minimum Voltage Limit (REG06H)
success &= SetInputMinimumVoltage(4000);
// 6. Set Input Current Limit (REG08H)
success &= SetInputCurrentLimit(2000);
// 7. Set Charge Current (REG14H)
success &= SetChargeCurrent(500);
// 8. Enable BGATE, Disable Source Mode, Enable Charging
uint16_t charge_config = MPS2760Registers::REG12H_CHG_EN_BIT |
MPS2760Registers::REG12H_BGATE_EN_BIT |
MPS2760Registers::REG12H_DCDC_EN_BIT;
uint16_t charge_mask = MPS2760Registers::REG12H_SRC_EN_BIT |
MPS2760Registers::REG12H_CHG_EN_BIT |
MPS2760Registers::REG12H_BGATE_EN_BIT |
MPS2760Registers::REG12H_DCDC_EN_BIT;
success &= ReadModifyWriteRegister(
MPS2760Registers::REG12H_CONFIG_4,
charge_config,
charge_mask
);
// 9. Set Switching Frequency AND ENABLE ADC CONTINUOUS MODE (REG0Eh)
// Bit 6-4: SW_FREQ = 001 (600kHz)
// Bit 7: ADC_CONV = 1 (Continuous)
uint16_t config0_val = (1 << 7) | (0b001 << MPS2760Registers::REG0EH_SW_FREQ_POS);
uint16_t config0_mask = (1 << 7) | MPS2760Registers::REG0EH_SW_FREQ_MASK;
success &= ReadModifyWriteRegister(
MPS2760Registers::REG0EH_CONFIG_0,
config0_val,
config0_mask
);
// 10. Configure default JEITA temperature thresholds (REG0DH)
uint16_t jeita_thresholds = MPS2760Registers::REG0DH_NTC_EN_BIT |
MPS2760Registers::REG0DH_NTC_ACT_BIT |
(0b10 << MPS2760Registers::REG0DH_VHOT_POS) |
(0b01 << MPS2760Registers::REG0DH_VWARM_POS) |
(0b10 << MPS2760Registers::REG0DH_VCOOL_POS) |
(0b01 << MPS2760Registers::REG0DH_VCOLD_POS);
uint16_t jeita_threshold_mask = MPS2760Registers::REG0DH_NTC_EN_BIT |
MPS2760Registers::REG0DH_NTC_ACT_BIT |
MPS2760Registers::REG0DH_VHOT_MASK |
MPS2760Registers::REG0DH_VWARM_MASK |
MPS2760Registers::REG0DH_VCOOL_MASK |
MPS2760Registers::REG0DH_VCOLD_MASK;
success &= ReadModifyWriteRegister(
MPS2760Registers::REG0DH_TEMP_PROTECTION,
jeita_thresholds,
jeita_threshold_mask
);
// 11. Configure default JEITA actions (REG0CH)
uint16_t jeita_actions = (0b01 << MPS2760Registers::REG0CH_WARM_ACT_POS) |
(0b10 << MPS2760Registers::REG0CH_COOL_ACT_POS) |
(0b10000 << MPS2760Registers::REG0CH_JEITA_VSET_POS) |
(0b01 << MPS2760Registers::REG0CH_JEITA_ISET_POS);
uint16_t jeita_action_mask = MPS2760Registers::REG0CH_WARM_ACT_MASK |
MPS2760Registers::REG0CH_COOL_ACT_MASK |
MPS2760Registers::REG0CH_JEITA_VSET_MASK |
MPS2760Registers::REG0CH_JEITA_ISET_MASK;
success &= ReadModifyWriteRegister(
MPS2760Registers::REG0CH_JEITA_ACTION,
jeita_actions,
jeita_action_mask
);
EnableCharging(true);
return success;
}
When my device goes to standby I execute the following function to get the MP2760 in low power mode:
bool MPS2760::EnterLowPowerMode() {
bool success = true;
// 1. Disable ADC (REG0Eh Bit 8)
// Disabling ADC drops consumption significantly (saving ~1.5mA).
success &= ReadModifyWriteRegister(
MPS2760Registers::REG0EH_CONFIG_0,
0, // Set bit to 0
MPS2760Registers::REG0EH_ADC_START_BIT | MPS2760Registers::REG0EH_ADC_CONV_BIT
);
// 2. Disable Watchdog, Source Mode, AND BGATE (REG12h)
uint16_t reg12_val = 0; // Set all targeted bits to 0
uint16_t reg12_mask = MPS2760Registers::REG12H_WTD_MASK |
MPS2760Registers::REG12H_SRC_EN_BIT |
MPS2760Registers::REG12H_BGATE_EN_BIT |
MPS2760Registers::REG12H_DCDC_EN_BIT |
MPS2760Registers::REG12H_CHG_EN_BIT;
success &= ReadModifyWriteRegister(
MPS2760Registers::REG12H_CONFIG_4,
reg12_val,
reg12_mask
);
return success;
}
Do I need to disable more to get it to the lowest power mode?
Thanks,
Robin
