summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Weber <hybotics.sd@gmail.com>2022-11-28 19:08:25 -0800
committerDamien George <damien@micropython.org>2022-12-13 17:35:55 +1100
commitf2de289ef36e666ca66127263cf752a6e9899e50 (patch)
tree80a6fb8424f5404b42c6ff774d9625a867726d82
parentf6f177807fe4b9552e1bdd84698c03f683f381d6 (diff)
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 <hybotics.sd@gmail.com>.
-rw-r--r--ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h b/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.h
index 76f075546..dab3d442b 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)