[HAL][I2C] Update I2C_MasterReceive_RXNE() process to safe manage data N= 2 and N= 3 Disable BUF interrupt if nothing to do.
diff --git a/Src/stm32f2xx_hal_i2c.c b/Src/stm32f2xx_hal_i2c.c index 1330cb5..173306c 100644 --- a/Src/stm32f2xx_hal_i2c.c +++ b/Src/stm32f2xx_hal_i2c.c
@@ -5604,7 +5604,9 @@ } else { - /* Do nothing */ + /* Disable BUF interrupt, this help to treat correctly the last 2 bytes + on BTF subroutine if there is a reception delay between N-1 and N byte */ + __HAL_I2C_DISABLE_IT(hi2c, I2C_IT_BUF); } } }