Skip to content

Commit

Permalink
stmhal: Fix clock configuration for STM32L476-discovery; also add I2C2.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbad authored and dpgeorge committed May 10, 2016
1 parent e89413e commit b924f64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions stmhal/boards/STM32L476DISC/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b924f64

Please sign in to comment.