Skip to content

Commit df73abc

Browse files
committed
Only enable DC/DC converter when SoftDevice is managing power
1 parent 215403e commit df73abc

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/helpers/NRF52Board.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,15 @@ bool NRF52Board::configureVoltageWake(uint8_t ain_channel, uint8_t refsel) {
258258
void NRF52BoardDCDC::begin() {
259259
NRF52Board::begin();
260260

261-
// Enable DC/DC converter for improved power efficiency
261+
// Enable DC/DC converter only when SoftDevice is managing the POWER peripheral.
262+
// Without SoftDevice, NRF_POWER->DCDCEN = 1 leaves the DC/DC permanently on,
263+
// which causes boot failures on some boards when running on battery alone.
264+
// The SoftDevice manages DC/DC dynamically (on during radio, off during idle),
265+
// which is the safe way to use it.
262266
uint8_t sd_enabled = 0;
263267
sd_softdevice_is_enabled(&sd_enabled);
264268
if (sd_enabled) {
265269
sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
266-
} else {
267-
NRF_POWER->DCDCEN = 1;
268270
}
269271
}
270272

0 commit comments

Comments
 (0)