diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-08 13:41:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-08 13:41:31 +0000 |
commit | 169a4bbc7e661fc920fd74050ec064b68652c878 (patch) | |
tree | 47e0704bb935fef6bd22a6a1e05c24663d1393ba /os/hal/platforms/STM32F1xx/hal_lld.c | |
parent | 040c4026cc184427e6f37495fa7fe6ce80d67d35 (diff) | |
download | ChibiOS-169a4bbc7e661fc920fd74050ec064b68652c878.tar.gz ChibiOS-169a4bbc7e661fc920fd74050ec064b68652c878.tar.bz2 ChibiOS-169a4bbc7e661fc920fd74050ec064b68652c878.zip |
STM32F1xx devices clock configuration updated to make it similar to the newer STM32 devices.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3764 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F1xx/hal_lld.c')
-rw-r--r-- | os/hal/platforms/STM32F1xx/hal_lld.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F1xx/hal_lld.c b/os/hal/platforms/STM32F1xx/hal_lld.c index 7e68883ab..3f5f44efe 100644 --- a/os/hal/platforms/STM32F1xx/hal_lld.c +++ b/os/hal/platforms/STM32F1xx/hal_lld.c @@ -140,9 +140,15 @@ void stm32_clock_init(void) { #endif
/* Clock settings.*/
+#if STM32_HAS_USB
RCC->CFGR = STM32_MCOSEL | STM32_USBPRE | STM32_PLLMUL | STM32_PLLXTPRE |
STM32_PLLSRC | STM32_ADCPRE | STM32_PPRE2 | STM32_PPRE1 |
STM32_HPRE;
+#else
+ RCC->CFGR = STM32_MCOSEL | STM32_PLLMUL | STM32_PLLXTPRE |
+ STM32_PLLSRC | STM32_ADCPRE | STM32_PPRE2 | STM32_PPRE1 |
+ STM32_HPRE;
+#endif
/* Flash setup and final clock selection. */
FLASH->ACR = STM32_FLASHBITS;
|