From 55d9399ab85efc6250f60fd4440fc3cf97e506a5 Mon Sep 17 00:00:00 2001 From: Malte Brieske <9287988+mbrieske@users.noreply.github.com> Date: Wed, 13 Aug 2025 16:25:52 +0200 Subject: wait for STOP flag when writing too --- embassy-stm32/src/i2c/v2.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 7f73ff82b..aeb4c1c00 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs @@ -464,11 +464,13 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> { } } // Wait until the write finishes - let result = self.wait_tc(timeout); + self.wait_tc(timeout)?; if send_stop { self.master_stop(); + self.wait_stop(timeout)?; } - result + + Ok(()) } // ========================= -- cgit