fix DC/DC enable for boards which currently have it.

this fixes how the reg1 dc/dc converter is enabled on WisMesh Tag / T1000e / WM1110 and Xiao NRF52
This commit is contained in:
taco 2025-12-03 15:58:36 +11:00
parent dde9b7cc76
commit e1d3da942b
4 changed files with 33 additions and 6 deletions

View file

@ -9,10 +9,14 @@ void T1000eBoard::begin() {
startup_reason = BD_STARTUP_NORMAL;
btn_prev_state = HIGH;
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
// Enable DC/DC converter for improved power efficiency
NRF_POWER->DCDCEN = 1;
uint8_t sd_enabled = 0;
sd_softdevice_is_enabled(&sd_enabled);
if (sd_enabled) {
sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
} else {
NRF_POWER->DCDCEN = 1;
}
#ifdef BUTTON_PIN
pinMode(BATTERY_PIN, INPUT);