Skip to content

Commit b87f832

Browse files
committed
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 <erian747@gmail.com>
1 parent f9cfcfc commit b87f832

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/i2c/i2c_ll_stm32_v2.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,15 @@ int i2c_stm32_error(const struct device *dev)
639639
data->current.is_arlo = 1U;
640640
goto end;
641641
}
642-
642+
/*
643+
* Don't end a transaction on bus error in master mode
644+
* as errata sheet says that spurious false detections
645+
* of BERR can happened which shall be ignored
646+
* If a real Bus Error occurs, transaction will time out
647+
*/
643648
if (LL_I2C_IsActiveFlag_BERR(i2c)) {
644649
LL_I2C_ClearFlag_BERR(i2c);
645650
data->current.is_err = 1U;
646-
goto end;
647651
}
648652

649653
#if defined(CONFIG_SMBUS_STM32_SMBALERT)

0 commit comments

Comments
 (0)