Power manager
auxiliaryPowerControlPin() - SystemPowerConfiguration
Since 5.9.0:
Devices using the Particle Power Module include a 3V3_AUX
power output
that can be controlled by a GPIO. On the M.2 SoM breakout board, this powers the Feather connector. On the Muon,
it powers the Ethernet port and LoRaWAN module.
The main reason for this is that until the PMIC is configured, the input current with no battery
connected is limited to 100 mA. This is insufficient for the M-SoM to boot when
using a peripheral that requires a lot of current, like the WIZnet W5500 Ethernet module. The
system power manager prevents turning on 3V3_AUX
until after the PMIC is configured
and the PMIC has negotiated a higher current from the USB host (if powered by USB).
This setting is persistent and only needs to be set once. In fact, the PMIC initialization
normally occurs before user firmware is run. This is also necessary because if you are using Ethernet
and enter safe mode (breathing magenta), it's necessary to enable 3V3_AUX
so if you are using
Ethernet, you can still get OTA updates while in safe mode.
After changing the auxiliary power configuration you must reset the device.
// PROTOTYPES
SystemPowerConfiguration& auxiliaryPowerControlPin(uint8_t pin, bool activeLevel = 1)
uint8_t auxiliaryPowerControlPin() const
uint8_t auxiliaryPowerControlActiveLevel()
// EXAMPLE - Muon
SystemPowerConfiguration powerConfig = System.getPowerConfiguration();
powerConfig.auxiliaryPowerControlPin(D7).interruptPin(A7);
System.setPowerConfiguration(powerConfig);
// EXAMPLE - M.2 SoM Breakout board
SystemPowerConfiguration powerConfig = System.getPowerConfiguration();
powerConfig.auxiliaryPowerControlPin(D23).interruptPin(A6);
System.setPowerConfiguration(powerConfig);