summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/boards/STM32F4DISC
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-18 15:30:04 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-18 21:40:58 +0100
commit8bdbc20e74907f57cc1d1659bb256eb51ed55aaf (patch)
tree79996bca0b5e532af8abd692e855759ff597dc98 /stmhal/boards/STM32F4DISC
parent23008db6e1cdbc15397a2e3d213b8d94e1b8d68e (diff)
downloadmicropython-8bdbc20e74907f57cc1d1659bb256eb51ed55aaf.tar.gz
micropython-8bdbc20e74907f57cc1d1659bb256eb51ed55aaf.zip
stmhal: Make HSE PLL parameters configurable per board.
Diffstat (limited to 'stmhal/boards/STM32F4DISC')
-rw-r--r--stmhal/boards/STM32F4DISC/mpconfigboard.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.h b/stmhal/boards/STM32F4DISC/mpconfigboard.h
index 234692e2e0..2dc016d0fc 100644
--- a/stmhal/boards/STM32F4DISC/mpconfigboard.h
+++ b/stmhal/boards/STM32F4DISC/mpconfigboard.h
@@ -19,6 +19,12 @@
#define MICROPY_HW_ENABLE_SPI3 (0)
#define MICROPY_HW_ENABLE_CAN (1)
+// HSE is 8MHz
+#define MICROPY_HW_CLK_PLLM (8)
+#define MICROPY_HW_CLK_PLLN (336)
+#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
+#define MICROPY_HW_CLK_PLLQ (7)
+
// USRSW is pulled low. Pressing the button makes the input go high.
#define MICROPY_HW_USRSW_PIN (pin_A0)
#define MICROPY_HW_USRSW_PULL (GPIO_NOPULL)