aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-03 08:45:54 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-03 08:45:54 +0000
commit033585af1abc8f609f3104419023457dec1cfd72 (patch)
tree74d844a6ff770261f092b041495b9a5da59ae9b3 /os/hal
parentb2a6a639f874bdf2a731995b191ad0ca65ca65ed (diff)
downloadChibiOS-033585af1abc8f609f3104419023457dec1cfd72.tar.gz
ChibiOS-033585af1abc8f609f3104419023457dec1cfd72.tar.bz2
ChibiOS-033585af1abc8f609f3104419023457dec1cfd72.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5345 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32F37x/hal_lld.c14
-rw-r--r--os/hal/platforms/STM32F37x/hal_lld.h4
2 files changed, 7 insertions, 11 deletions
diff --git a/os/hal/platforms/STM32F37x/hal_lld.c b/os/hal/platforms/STM32F37x/hal_lld.c
index 1a61bec91..d3d809662 100644
--- a/os/hal/platforms/STM32F37x/hal_lld.c
+++ b/os/hal/platforms/STM32F37x/hal_lld.c
@@ -136,9 +136,6 @@ void hal_lld_init(void) {
/* 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;
}
/**
@@ -182,13 +179,12 @@ void stm32_clock_init(void) {
#endif
/* Clock settings.*/
- RCC->CFGR = STM32_MCOSEL | STM32_USBPRE | STM32_PLLMUL |
- STM32_PLLSRC | STM32_PPRE1 | STM32_PPRE2 |
+ RCC->CFGR = STM32_MCOSEL | STM32_USBPRE | STM32_PLLMUL |
+ STM32_PLLSRC | STM32_PPRE1 | STM32_PPRE2 |
STM32_HPRE;
- RCC->CFGR2 = STM32_ADC34PRES | STM32_ADC12PRES | STM32_PREDIV;
- RCC->CFGR3 = STM32_UART5SW | STM32_UART4SW | STM32_USART3SW |
- STM32_USART2SW | STM32_TIM8SW | STM32_TIM1SW |
- STM32_I2C2SW | STM32_I2C1SW | STM32_USART1SW;
+ RCC->CFGR2 = STM32_PREDIV;
+ RCC->CFGR3 = STM32_USART3SW | STM32_USART2SW | STM32_I2C2SW |
+ STM32_I2C1SW | STM32_USART1SW;
#if STM32_ACTIVATE_PLL
/* PLL activation.*/
diff --git a/os/hal/platforms/STM32F37x/hal_lld.h b/os/hal/platforms/STM32F37x/hal_lld.h
index 1e2ef0910..7e3282790 100644
--- a/os/hal/platforms/STM32F37x/hal_lld.h
+++ b/os/hal/platforms/STM32F37x/hal_lld.h
@@ -564,7 +564,7 @@
* @brief ADC prescaler value.
*/
#if !defined(STM32_ADCPRE) || defined(__DOXYGEN__)
-#define STM32_ADCPRE STM32_ADCPRE_DIV2
+#define STM32_ADCPRE STM32_ADCPRE_DIV4
#endif
/**
@@ -947,7 +947,7 @@
#endif
/* ADC minimum frequency check.*/
-#if STM32ADCLK < STM32_ADCCLK_MIN
+#if STM32_ADCLK < STM32_ADCCLK_MIN
#error "STM32_ADCLK exceeding maximum frequency (STM32_ADCCLK_MIN)"
#endif