From d5fa815855e904a5928441a45a37b798a0d618e9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 5 Nov 2011 10:58:13 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3469 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F4xx/hal_lld.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'os/hal/platforms/STM32F4xx/hal_lld.c') diff --git a/os/hal/platforms/STM32F4xx/hal_lld.c b/os/hal/platforms/STM32F4xx/hal_lld.c index 74afa4bdb..ae399242b 100644 --- a/os/hal/platforms/STM32F4xx/hal_lld.c +++ b/os/hal/platforms/STM32F4xx/hal_lld.c @@ -58,11 +58,12 @@ */ void hal_lld_init(void) { - /* Reset of all peripherals.*/ -// RCC->APB1RSTR = 0xFFFFFFFF; -// RCC->APB2RSTR = 0xFFFFFFFF; -// RCC->APB1RSTR = 0; -// RCC->APB2RSTR = 0; + /* Reset of all peripherals. AHB3 is not reseted because it could have + been initialized in the board initialization file (board.c).*/ + rccResetAHB1(!0); + rccResetAHB2(!0); + rccResetAPB1(!RCC_APB1RSTR_PWRRST); + rccResetAPB2(!RCC_APB2RSTR_SYSCFGRST); /* SysTick initialization using the system clock.*/ SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1; @@ -71,8 +72,6 @@ void hal_lld_init(void) { SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk; - - #if defined(STM32_DMA_REQUIRED) dmaInit(); #endif -- cgit v1.2.3