Skip to content

Commit

Permalink
drivers: i2c: stm32: disable reload mode at the end of a transfer
Browse files Browse the repository at this point in the history
Fixes an issue that reload mode is not disabled in case of an error.
From this case the driver could not recover because in msg_init()
no new transfer could be initialized.

Signed-off-by: Mario Jaun <[email protected]>
  • Loading branch information
mjaun authored and carlescufi committed Oct 4, 2023
1 parent d487794 commit 01bdd84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/i2c/i2c_ll_stm32_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ static void stm32_i2c_master_mode_end(const struct device *dev)

stm32_i2c_disable_transfer_interrupts(dev);

if (LL_I2C_IsEnabledReloadMode(i2c)) {
LL_I2C_DisableReloadMode(i2c);
}

#if defined(CONFIG_I2C_TARGET)
data->master_active = false;
if (!data->slave_attached) {
Expand Down

0 comments on commit 01bdd84

Please sign in to comment.