From 0d8350f326361a0f7c5aa2d71f48cbec7c39287a Mon Sep 17 00:00:00 2001 From: René van Dorst Date: Tue, 19 Aug 2025 16:37:24 +0200 Subject: stm32/i2c: Pull-down enabled when non-pull was requested. When no internal pull-up is needed, the pull-down was enabled instead of pull-none. With the pull-down resistors and external pull-up resistors, this creates a voltage divider, which causes unwanted situation. --- embassy-stm32/src/i2c/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/i2c/config.rs b/embassy-stm32/src/i2c/config.rs index b27bb778c..4e3b736c7 100644 --- a/embassy-stm32/src/i2c/config.rs +++ b/embassy-stm32/src/i2c/config.rs @@ -156,7 +156,7 @@ impl Config { self.gpio_speed, match self.scl_pullup { true => Pull::Up, - false => Pull::Down, + false => Pull::None, }, ); } @@ -170,7 +170,7 @@ impl Config { self.gpio_speed, match self.sda_pullup { true => Pull::Up, - false => Pull::Down, + false => Pull::None, }, ); } -- cgit