PMIC (Power Management IC)

Input source control register

This is register REG00. It controls whether the buck (step-down) converter is enabled, and sets the input voltage and input current limits used to detect an overloaded input source.

readInputSourceRegister()

byte readInputSourceRegister(void);

Returns the raw value of REG00.

enableBuck()

bool enableBuck(void);

Enables the buck (step-down) converter (REG00 bit 7 = 0), so the system can be powered from VBUS or VIN. This is the default state.

disableBuck()

bool disableBuck(void);

Disables the buck converter (REG00 bit 7 = 1), so the system is powered only from the LiPo battery, even if VBUS or VIN is present.

isBuckEnabled()

bool isBuckEnabled();

Returns true if the buck converter is enabled (REG00 bit 7 = 0).

setInputCurrentLimit()

bool setInputCurrentLimit(uint16_t current);

Sets the input current limit (IINLIM, REG00 bits 2:0). Valid values are 100, 150, 500, 900, 1200, 1500, 2000, or 3000 (mA); the closest valid value at or below the value passed in is used. Note that most Particle devices further limit the maximum current with a hardware ILIM resistor (typically around 1500 mA, up to 3000 mA on the Muon and PM-BAT), so the actual input current limit is the lower of this setting and the hardware limit.

See also: powerSourceMaxCurrent() in the Power Manager API is the recommended way to set this value, since it also persists the setting and reapplies it at every boot.

getInputCurrentLimit()

uint16_t getInputCurrentLimit(void);

Returns the currently configured input current limit, in mA (one of 100, 150, 500, 900, 1200, 1500, 2000, or 3000), decoded from the IINLIM bits.

See also: powerSourceMaxCurrent().

setInputVoltageLimit()

bool setInputVoltageLimit(uint16_t voltage);

Sets the input voltage limit (VINDPM, REG00 bits 6:3), also known as VINDPM, in millivolts. Valid values are 3880 to 5080, in 80 mV steps (the value passed in is rounded down to the nearest valid step); the default is 4360 mV. If the input voltage sags below this value under load, the PMIC reduces the charge current to prevent the input source from being overloaded.

See also: powerSourceMinVoltage() in the Power Manager API is the recommended way to set this value, since it also persists the setting and reapplies it at every boot.

getInputVoltageLimit()

uint16_t getInputVoltageLimit(void);

Returns the currently configured input voltage limit (VINDPM), in millivolts.

See also: powerSourceMinVoltage().