/ * @brief * Initialize the board. * * @details * * @note * ******************************************************************************/
| 250 | * |
| 251 | ******************************************************************************/ |
| 252 | void rt_hw_board_init(void) |
| 253 | { |
| 254 | /* Chip errata */ |
| 255 | CHIP_Init(); |
| 256 | |
| 257 | /* Initialize DVK board register access */ |
| 258 | #if defined(EFM32_GXXX_DK) |
| 259 | DVK_init(); |
| 260 | #elif defined(EFM32GG_DK3750) |
| 261 | DVK_init(DVK_Init_EBI); |
| 262 | |
| 263 | /* Disable all DVK interrupts */ |
| 264 | DVK_disableInterrupt(BC_INTEN_MASK); |
| 265 | DVK_clearInterruptFlags(BC_INTFLAG_MASK); |
| 266 | #endif |
| 267 | |
| 268 | /* config NVIC Configuration */ |
| 269 | NVIC_Configuration(); |
| 270 | |
| 271 | #if defined(EFM32_USING_HFXO) |
| 272 | /* Configure external oscillator */ |
| 273 | SystemHFXOClockSet(EFM32_HFXO_FREQUENCY); |
| 274 | |
| 275 | /* Switching the CPU clock source to HFXO */ |
| 276 | CMU_ClockSelectSet(cmuClock_HF, cmuSelect_HFXO); |
| 277 | |
| 278 | /* Turning off the high frequency RC Oscillator (HFRCO) */ |
| 279 | CMU_OscillatorEnable(cmuOsc_HFRCO, false, false); |
| 280 | #endif |
| 281 | |
| 282 | #if defined(EFM32_USING_LFXO) |
| 283 | CMU_ClockSelectSet(cmuClock_LFA,cmuSelect_LFXO); |
| 284 | CMU_ClockSelectSet(cmuClock_LFB, cmuSelect_LFXO); |
| 285 | #endif |
| 286 | |
| 287 | #if defined(EFM32_SWO_ENABLE) |
| 288 | /* Enable SWO */ |
| 289 | Swo_Configuration(); |
| 290 | #endif |
| 291 | |
| 292 | /* Enable high frequency peripheral clock */ |
| 293 | CMU_ClockEnable(cmuClock_HFPER, true); |
| 294 | /* Enabling clock to the interface of the low energy modules */ |
| 295 | CMU_ClockEnable(cmuClock_CORELE, true); |
| 296 | /* Enable GPIO clock */ |
| 297 | CMU_ClockEnable(cmuClock_GPIO, true); |
| 298 | |
| 299 | /* Configure the SysTick */ |
| 300 | SysTick_Configuration(); |
| 301 | } |
| 302 | |
| 303 | /***************************************************************************//** |
| 304 | * @brief |
no test coverage detected