Skip to content

Commit 789e1d2

Browse files
erian747jhedberg
authored andcommitted
drivers: i2c_stm32_v2: Bus error errata fix
Don't abort transaction on bus error in master mode according to errata sheet Signed-off-by: Erik Andersson <[email protected]>
1 parent a3e6302 commit 789e1d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/i2c/i2c_ll_stm32_v2.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,14 @@ int i2c_stm32_error(const struct device *dev)
631631
goto end;
632632
}
633633

634+
/* Don't end a transaction on bus error in master mode
635+
* as errata sheet says that spurious false detections
636+
* of BERR can happen which shall be ignored.
637+
* If a real Bus Error occurs, transaction will time out.
638+
*/
634639
if (LL_I2C_IsActiveFlag_BERR(i2c)) {
635640
LL_I2C_ClearFlag_BERR(i2c);
636641
data->current.is_err = 1U;
637-
goto end;
638642
}
639643

640644
#if defined(CONFIG_SMBUS_STM32_SMBALERT)

0 commit comments

Comments
 (0)