예제 #1
0
void stm32_clockconfig(void)
{
  /* Make sure that we are starting in the reset state */

  rcc_reset();
  
#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)

  /* Invoke Board Custom Clock Configuration */

  stm32_board_clockconfig();
  
#else

  /* Invoke standard, fixed clock configuration based on definitions in board.h */

  stm32_stdclockconfig();

#endif

  /* Enable peripheral clocking */
  
  rcc_enableahb();
  rcc_enableapb2();
  rcc_enableapb1();
}
예제 #2
0
파일: stm32l4_rcc.c 프로젝트: a1ien/nuttx
void stm32l4_clockconfig(void)
{
  /* Make sure that we are starting in the reset state */

  rcc_reset();

  /* Reset backup domain if appropriate */

  rcc_resetbkp();

#if defined(CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG)

  /* Invoke Board Custom Clock Configuration */

  stm32l4_board_clockconfig();

#else

  /* Invoke standard, fixed clock configuration based on definitions in board.h */

  stm32l4_stdclockconfig();

#endif

  /* Enable peripheral clocking */

  rcc_enableperipherals();
}