From f2de289ef36e666ca66127263cf752a6e9899e50 Mon Sep 17 00:00:00 2001 From: Dale Weber Date: Mon, 28 Nov 2022 19:08:25 -0800 Subject: [PATCH] stm32/boards/NUCLEO_F429ZI: Enable I2C1 and I2C2 with default pins. The datasheet on page 55 shows PF0 (SDA) and PF1 (SCL) are the pins for I2C2, but these pins do not work. Checking the MBED pinout for the NUCLEO-F429ZI shows: I2C1: PB8 (SCL) and PB9 (SDA). I2C2: PB10 (SCL) and PB11 (SDA). Both of these work and can be scanned and find devices connected to them. Signed-off-by: Dale Weber . --- ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h b/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h index 76f075546c..dab3d442bb 100644 --- a/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h +++ b/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h @@ -40,6 +40,12 @@ #define MICROPY_HW_UART_REPL_BAUD 115200 // I2C buses +#define MICROPY_HW_I2C1_SCL (pin_B8) // Pin 2 on CN7 +#define MICROPY_HW_I2C1_SDA (pin_B9) // Pin 4 on CN7 + +#define MICROPY_HW_I2C2_SCL (pin_B10) // Pin 32 on CN10 +#define MICROPY_HW_I2C2_SDA (pin_B11) // Pin 34 on CN10 + #define MICROPY_HW_I2C3_SCL (pin_A8) #define MICROPY_HW_I2C3_SDA (pin_C9)