diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-05 10:58:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-05 10:58:13 +0000 |
commit | d5fa815855e904a5928441a45a37b798a0d618e9 (patch) | |
tree | ac699cd593cd165541ec073ca698e0672e46a8b0 /os/hal/platforms/STM32F4xx/hal_lld.c | |
parent | 1297070fa9afcb4895b459bf798822e72bb42ea1 (diff) | |
download | ChibiOS-d5fa815855e904a5928441a45a37b798a0d618e9.tar.gz ChibiOS-d5fa815855e904a5928441a45a37b798a0d618e9.tar.bz2 ChibiOS-d5fa815855e904a5928441a45a37b798a0d618e9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3469 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F4xx/hal_lld.c')
-rw-r--r-- | os/hal/platforms/STM32F4xx/hal_lld.c | 13 |
1 files changed, 6 insertions, 7 deletions
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
|