git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4885 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2012-12-08 16:05:55 +00:00
parent b674238b33
commit a98fcfb82b
1 changed files with 7 additions and 8 deletions

View File

@ -124,6 +124,13 @@ void hal_lld_init(void) {
#if STM32_PVD_ENABLE
PWR->CR |= PWR_CR_PVDE | (STM32_PLS & STM32_PLS_MASK);
#endif /* STM32_PVD_ENABLE */
/* SYSCFG clock enabled here because it is a multi-functional unit shared
among multiple drivers.*/
rccEnableAPB2(RCC_APB2ENR_SYSCFGEN, TRUE);
/* USB IRQ relocated to not conflict with CAN.*/
SYSCFG->CFGR1 |= SYSCFG_CFGR1_USB_IT_RMP;
}
/**
@ -192,14 +199,6 @@ void stm32_clock_init(void) {
while ((RCC->CFGR & RCC_CFGR_SWS) != (STM32_SW << 2))
; /* Waits selection complete. */
#endif
/* SYSCFG clock enabled here because it is a multi-functional unit shared
among multiple drivers.*/
rccEnableAPB2(RCC_APB2ENR_SYSCFGEN, TRUE);
/* USB IRQ relocated to not conflict with CAN.*/
SYSCFG->CFGR1 |= SYSCFG_CFGR1_USB_IT_RMP;
#endif /* !STM32_NO_INIT */
}