cpu/nrf5x: also enable DCDC for REG0 if used

This commit is contained in:
Hauke Petersen 2021-01-20 12:41:32 +01:00
parent 3a9f8d5851
commit 9d7a37a571

View File

@ -42,6 +42,15 @@ static inline void nrfx_dcdc_init(void)
{ {
#ifdef NRF5X_ENABLE_DCDC #ifdef NRF5X_ENABLE_DCDC
NRF_POWER->DCDCEN = 1; NRF_POWER->DCDCEN = 1;
/* on CPUs that support high voltage power supply via VDDH and thus use a
* two stage regulator, we also enable the DC/DC converter for the first
* state. */
#ifdef POWER_MAINREGSTATUS_MAINREGSTATUS_High
if (NRF_POWER->MAINREGSTATUS == POWER_MAINREGSTATUS_MAINREGSTATUS_High) {
NRF_POWER->DCDCEN0 = 1;
}
#endif
#endif #endif
} }