summaryrefslogtreecommitdiffstatshomepage
path: root/stm/system_stm32f4xx.c
diff options
context:
space:
mode:
authormux <freelancer.c@gmail.com>2014-01-21 14:40:05 +0200
committermux <freelancer.c@gmail.com>2014-01-21 14:43:13 +0200
commite9c01dea3270da151b141201aa415b583cb5e583 (patch)
treeeced9ba7c489eb27d6d1cfbe31289344f1587cbb /stm/system_stm32f4xx.c
parent7280f790881fa174e4d234266ff42f0fe3d847bc (diff)
downloadmicropython-e9c01dea3270da151b141201aa415b583cb5e583.tar.gz
micropython-e9c01dea3270da151b141201aa415b583cb5e583.zip
Remove hardcoded PLL_M value
Diffstat (limited to 'stm/system_stm32f4xx.c')
-rw-r--r--stm/system_stm32f4xx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stm/system_stm32f4xx.c b/stm/system_stm32f4xx.c
index 8568a9b4f1..12ac4d6b56 100644
--- a/stm/system_stm32f4xx.c
+++ b/stm/system_stm32f4xx.c
@@ -54,9 +54,9 @@
*-----------------------------------------------------------------------------
* APB2 Prescaler | 2
*-----------------------------------------------------------------------------
- * HSE Frequency(Hz) | 8000000 changed dpgeorge
+ * HSE Frequency(Hz) | HSE_VALUE
*-----------------------------------------------------------------------------
- * PLL_M | 8 changed dpgeorge
+ * PLL_M | (HSE_VALUE/1000000)
*-----------------------------------------------------------------------------
* PLL_N | 336
*-----------------------------------------------------------------------------
@@ -251,7 +251,7 @@
/************************* PLL Parameters *************************************/
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
-#define PLL_M 8
+#define PLL_M (HSE_VALUE/1000000)
/* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */
#define PLL_Q 7