From a98fcfb82b94bbeb6eb7f81a2823a20fb77c8626 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 8 Dec 2012 16:05:55 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4885 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F3xx/hal_lld.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/os/hal/platforms/STM32F3xx/hal_lld.c b/os/hal/platforms/STM32F3xx/hal_lld.c index 8f7fe9102..f82e23c19 100644 --- a/os/hal/platforms/STM32F3xx/hal_lld.c +++ b/os/hal/platforms/STM32F3xx/hal_lld.c @@ -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 */ } -- cgit v1.2.3