From a8fcc7b238043d4aee2deccdc66bff127a2a9e8e Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sun, 14 Feb 2021 00:06:34 +0100 Subject: [PATCH] cpu/nrf5x: only enable DCDC for REG0 if REG0 exists nRF52833 has POWER_MAINREGSTATUS_MAINREGSTATUS_High, but no POWER->DCDCEN0 register. This breaks all builds on this MCU. Fix the ifdef to fix the build. --- cpu/nrf5x_common/include/nrfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/nrf5x_common/include/nrfx.h b/cpu/nrf5x_common/include/nrfx.h index 8b43fab5cb..680cdc8050 100644 --- a/cpu/nrf5x_common/include/nrfx.h +++ b/cpu/nrf5x_common/include/nrfx.h @@ -46,7 +46,7 @@ static inline void nrfx_dcdc_init(void) /* 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 +#ifdef POWER_DCDCEN0_DCDCEN_Msk if (NRF_POWER->MAINREGSTATUS == POWER_MAINREGSTATUS_MAINREGSTATUS_High) { NRF_POWER->DCDCEN0 = 1; }