diff options
| author | Damien George | 2015-04-18 15:30:04 +0100 |
|---|---|---|
| committer | Damien George | 2015-04-18 21:40:58 +0100 |
| commit | 8bdbc20e74907f57cc1d1659bb256eb51ed55aaf (patch) | |
| tree | 79996bca0b5e532af8abd692e855759ff597dc98 /stmhal/boards | |
| parent | 23008db6e1cdbc15397a2e3d213b8d94e1b8d68e (diff) | |
stmhal: Make HSE PLL parameters configurable per board.
Diffstat (limited to 'stmhal/boards')
| -rw-r--r-- | stmhal/boards/CERB40/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/HYDRABUS/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/PYBV10/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/PYBV3/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/PYBV4/mpconfigboard.h | 6 | ||||
| -rw-r--r-- | stmhal/boards/STM32F4DISC/mpconfigboard.h | 6 |
7 files changed, 42 insertions, 0 deletions
diff --git a/stmhal/boards/CERB40/mpconfigboard.h b/stmhal/boards/CERB40/mpconfigboard.h index a7df02b5b..93fc5b6c0 100644 --- a/stmhal/boards/CERB40/mpconfigboard.h +++ b/stmhal/boards/CERB40/mpconfigboard.h @@ -20,6 +20,12 @@ #define MICROPY_HW_ENABLE_SPI3 (1) #define MICROPY_HW_ENABLE_CAN (1) +// HSE is 12MHz +#define MICROPY_HW_CLK_PLLM (12) +#define MICROPY_HW_CLK_PLLN (336) +#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2) +#define MICROPY_HW_CLK_PLLQ (7) + // The Cerb40 has No LEDs // The Cerb40 has No SDCard diff --git a/stmhal/boards/HYDRABUS/mpconfigboard.h b/stmhal/boards/HYDRABUS/mpconfigboard.h index 74bcb39d8..3132084b5 100644 --- a/stmhal/boards/HYDRABUS/mpconfigboard.h +++ b/stmhal/boards/HYDRABUS/mpconfigboard.h @@ -19,6 +19,12 @@ #define MICROPY_HW_ENABLE_SPI3 (1) #define MICROPY_HW_ENABLE_CAN (0) +// 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/UBTN (Needs Jumper UBTN) 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) diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h index e97bf187f..b9735b938 100644 --- a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h +++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h @@ -23,6 +23,12 @@ #define MICROPY_HW_ENABLE_SPI3 (0) #define MICROPY_HW_ENABLE_CAN (0) +// HSE is 25MHz +#define MICROPY_HW_CLK_PLLM (25) +#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_B11) #define MICROPY_HW_USRSW_PULL (GPIO_NOPULL) diff --git a/stmhal/boards/PYBV10/mpconfigboard.h b/stmhal/boards/PYBV10/mpconfigboard.h index cb14efe49..5a47a7e46 100644 --- a/stmhal/boards/PYBV10/mpconfigboard.h +++ b/stmhal/boards/PYBV10/mpconfigboard.h @@ -20,6 +20,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) + // The pyboard has a 32kHz crystal for the RTC #define MICROPY_HW_RTC_USE_LSE (1) diff --git a/stmhal/boards/PYBV3/mpconfigboard.h b/stmhal/boards/PYBV3/mpconfigboard.h index 2b387554e..6bfb14e81 100644 --- a/stmhal/boards/PYBV3/mpconfigboard.h +++ b/stmhal/boards/PYBV3/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) + // The pyboard has a 32kHz crystal for the RTC #define MICROPY_HW_RTC_USE_LSE (1) diff --git a/stmhal/boards/PYBV4/mpconfigboard.h b/stmhal/boards/PYBV4/mpconfigboard.h index 61b161028..c10f80a01 100644 --- a/stmhal/boards/PYBV4/mpconfigboard.h +++ b/stmhal/boards/PYBV4/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) + // The pyboard has a 32kHz crystal for the RTC #define MICROPY_HW_RTC_USE_LSE (1) diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.h b/stmhal/boards/STM32F4DISC/mpconfigboard.h index 234692e2e..2dc016d0f 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) |
