Skip to content

Commit 728f76d

Browse files
authored
Merge pull request #5855 from SiliconLabs/feature/new/allow_dcdc_override
Allow overriding of DCDC settings per target
2 parents 671c2d7 + 18c973f commit 728f76d

File tree

6 files changed

+31
-2
lines changed

6 files changed

+31
-2
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG/TARGET_EFM32PG_STK3401/device_peripherals.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
cmuOscMode_Crystal, \
5555
}
5656
#endif
57+
58+
/* DCDC settings */
59+
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
60+
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
61+
#endif
5762
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG12/TARGET_EFM32PG12_STK3402/device_peripherals.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
cmuOscMode_Crystal, \
5555
}
5656
#endif
57+
58+
/* DCDC settings */
59+
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
60+
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
61+
#endif
5762
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/TARGET_EFR32MG1_BRD4150/device_peripherals.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
cmuOscMode_Crystal, \
5555
}
5656
#endif
57+
58+
/* DCDC settings */
59+
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
60+
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
61+
#endif
5762
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/TARGET_TB_SENSE_1/device_peripherals.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
cmuOscMode_Crystal, \
5555
}
5656
#endif
57+
58+
/* DCDC settings */
59+
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
60+
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
61+
#endif
5762
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG12/TARGET_TB_SENSE_12/device_peripherals.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,9 @@
5454
cmuOscMode_Crystal, \
5555
}
5656
#endif
57+
58+
/* DCDC settings */
59+
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
60+
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
61+
#endif
5762
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/common/mbed_overrides.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ void mbed_sdk_init()
3939
CHIP_Init();
4040

4141
#if defined(_SILICON_LABS_32B_SERIES_1)
42-
EMU_DCDCInit_TypeDef dcdcInit = EMU_DCDCINIT_DEFAULT;
42+
#if defined(EMU_NO_DCDC)
43+
EMU_DCDCPowerOff();
44+
#else
45+
EMU_DCDCInit_TypeDef dcdcInit = EMU_DCDCINIT_STK_DEFAULT;
4346
EMU_DCDCInit(&dcdcInit);
44-
47+
#endif
48+
4549
#if (CORE_CLOCK_SOURCE == HFXO)
4650
// Only init HFXO if not already done (e.g. by bootloader)
4751
if (CMU_ClockSelectGet(cmuClock_HF) != cmuSelect_HFXO) {

0 commit comments

Comments
 (0)