diff options
author | Tobias Badertscher <badi@baerospace.ch> | 2016-05-08 14:39:48 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-05-10 09:20:30 +0100 |
commit | b924f649cdf7da8711d6382ea08ee8080fc243c1 (patch) | |
tree | a5a78e2e09cc5f86eabc8ee5f958e5a1ca5bb8de | |
parent | e89413e9b081bfa48dcafac7fa22a544172c8d2f (diff) | |
download | micropython-b924f649cdf7da8711d6382ea08ee8080fc243c1.tar.gz micropython-b924f649cdf7da8711d6382ea08ee8080fc243c1.zip |
stmhal: Fix clock configuration for STM32L476-discovery; also add I2C2.
-rw-r--r-- | stmhal/boards/STM32L476DISC/mpconfigboard.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stmhal/boards/STM32L476DISC/mpconfigboard.h b/stmhal/boards/STM32L476DISC/mpconfigboard.h index f4617e67df..79857ccc26 100644 --- a/stmhal/boards/STM32L476DISC/mpconfigboard.h +++ b/stmhal/boards/STM32L476DISC/mpconfigboard.h @@ -16,11 +16,11 @@ #define MICROPY_HW_ENABLE_DAC (0) #define MICROPY_HW_ENABLE_CAN (0) -// HSE is 8MHz -#define MICROPY_HW_CLK_PLLM (2) +// MSI is used and is 4MHz +#define MICROPY_HW_CLK_PLLM (1) #define MICROPY_HW_CLK_PLLN (40) #define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV7) -#define MICROPY_HW_CLK_PLLR (RCC_PLLP_DIV7) +#define MICROPY_HW_CLK_PLLR (RCC_PLLR_DIV2) #define MICROPY_HW_CLK_PLLQ (RCC_PLLQ_DIV2) #define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_4 @@ -32,6 +32,8 @@ // I2C busses #define MICROPY_HW_I2C1_SCL (pin_B6) #define MICROPY_HW_I2C1_SDA (pin_B7) +#define MICROPY_HW_I2C2_SCL (pin_B10) +#define MICROPY_HW_I2C2_SDA (pin_B11) // We use an array of baudrates and corresponding TIMINGR values. // // The value 0x90112626 was obtained from the DISCOVERY_I2C1_TIMING constant |