Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 214d1be

Browse files
committed
[EFM32] Move board controller pin setting to config system
1 parent 5a88513 commit 214d1be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/common/mbed_overrides.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ void mbed_sdk_init()
4141
#if defined(_SILICON_LABS_32B_PLATFORM_2)
4242
EMU_DCDCInit_TypeDef dcdcInit = EMU_DCDCINIT_DEFAULT;
4343
EMU_DCDCInit(&dcdcInit);
44+
45+
#if defined(DEVICE_RF_2P4GHZ) || defined(DEVICE_RF_SUBGHZ)
46+
CMU_HFXOInit_TypeDef hfxoInit = CMU_HFXOINIT_WSTK_DEFAULT;
47+
// Initialize the HFXO using the settings from the WSTK bspconfig.h
48+
// Note: This configures things like the capacitive tuning CTUNE variable
49+
// which can vary based on your hardware design.
50+
CMU_HFXOInit(&hfxoInit);
51+
#endif
4452
#endif
4553

4654
/* Set up the clock sources for this chip */
@@ -101,6 +109,8 @@ void mbed_sdk_init()
101109
# error "Low energy clock selection not valid"
102110
#endif
103111

112+
#if defined(EFM_BC_EN)
104113
/* Enable BC line driver to avoid garbage on CDC port */
105114
gpio_init_out_ex(&bc_enable, EFM_BC_EN, 1);
115+
#endif
106116
}

0 commit comments

Comments
 (0)