Merge pull request #5855 from SiliconLabs/feature/new/allow_dcdc_override

Allow overriding of DCDC settings per target
pull/5865/head
Cruz Monrreal 2018-01-16 15:45:59 -06:00 committed by GitHub
commit 728f76d63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 2 deletions

View File

@ -54,4 +54,9 @@
cmuOscMode_Crystal, \
}
#endif
/* DCDC settings */
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
#endif
#endif

View File

@ -54,4 +54,9 @@
cmuOscMode_Crystal, \
}
#endif
/* DCDC settings */
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
#endif
#endif

View File

@ -54,4 +54,9 @@
cmuOscMode_Crystal, \
}
#endif
/* DCDC settings */
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
#endif
#endif

View File

@ -54,4 +54,9 @@
cmuOscMode_Crystal, \
}
#endif
/* DCDC settings */
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
#endif
#endif

View File

@ -54,4 +54,9 @@
cmuOscMode_Crystal, \
}
#endif
/* DCDC settings */
#if !defined(EMU_DCDCINIT_STK_DEFAULT)
#define EMU_DCDCINIT_STK_DEFAULT EMU_DCDCINIT_DEFAULT
#endif
#endif

View File

@ -39,9 +39,13 @@ void mbed_sdk_init()
CHIP_Init();
#if defined(_SILICON_LABS_32B_SERIES_1)
EMU_DCDCInit_TypeDef dcdcInit = EMU_DCDCINIT_DEFAULT;
#if defined(EMU_NO_DCDC)
EMU_DCDCPowerOff();
#else
EMU_DCDCInit_TypeDef dcdcInit = EMU_DCDCINIT_STK_DEFAULT;
EMU_DCDCInit(&dcdcInit);
#endif
#if (CORE_CLOCK_SOURCE == HFXO)
// Only init HFXO if not already done (e.g. by bootloader)
if (CMU_ClockSelectGet(cmuClock_HF) != cmuSelect_HFXO) {