diff options
Diffstat (limited to 'stmhal/system_stm32f4xx.c')
-rw-r--r-- | stmhal/system_stm32f4xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/system_stm32f4xx.c b/stmhal/system_stm32f4xx.c index 4e5490db56..f5a97c0ef3 100644 --- a/stmhal/system_stm32f4xx.c +++ b/stmhal/system_stm32f4xx.c @@ -267,8 +267,8 @@ void SystemCoreClockUpdate(void) * AHB Prescaler = 1
* APB1 Prescaler = 4
* APB2 Prescaler = 2
- * HSE Frequency(Hz) = 8000000
- * PLL_M = 8
+ * HSE Frequency(Hz) = HSE_VALUE
+ * PLL_M = HSE_VALUE/1000000
* PLL_N = 336
* PLL_P = 2
* PLL_Q = 7
@@ -296,7 +296,7 @@ void SystemClock_Config(void) RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
- RCC_OscInitStruct.PLL.PLLM = 8;
+ RCC_OscInitStruct.PLL.PLLM = HSE_VALUE/1000000;
RCC_OscInitStruct.PLL.PLLN = 336;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 7;
|