From 9b812e3fa306616d7934d97033863f63e97e5ce0 Mon Sep 17 00:00:00 2001 From: Alexander Oryshchenko Date: Tue, 13 Feb 2018 11:41:57 -0600 Subject: [PATCH] arm/arm/src/stm32: Corrections to STM32 F4 I2C to fix the NORESTART flag. --- arch/arm/src/stm32/stm32f40xxx_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c index 1d25588eaa5..ac3c85adc00 100644 --- a/arch/arm/src/stm32/stm32f40xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c @@ -1315,7 +1315,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv) * return the error to the waiting task. */ - if (((priv->msgv[0].flags & I2C_M_NORESTART) != 0 && (status & I2C_SR1_BTF) == 0) || + if (((priv->msgv[0].flags & I2C_M_NORESTART) != 0 && (status & I2C_SR1_TXE) == 0) || ((priv->msgv[0].flags & I2C_M_NORESTART) == 0 && (status & I2C_SR1_SB) == 0)) { #if defined(CONFIG_STM32_I2C_DMA) || defined(CONFIG_I2C_POLLED)