From 4c60407d1f50e94b18a2cf126dc8854c1ee317d5 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 11 Jan 2020 09:27:55 +0000 Subject: [PATCH] Fixed bug #1064. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13256 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/I2Cv1/hal_i2c_lld.c | 4 ++++ readme.txt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/os/hal/ports/STM32/LLD/I2Cv1/hal_i2c_lld.c b/os/hal/ports/STM32/LLD/I2Cv1/hal_i2c_lld.c index 6e96a7592..3fc2289bd 100644 --- a/os/hal/ports/STM32/LLD/I2Cv1/hal_i2c_lld.c +++ b/os/hal/ports/STM32/LLD/I2Cv1/hal_i2c_lld.c @@ -65,6 +65,9 @@ #define I2C_EV5_MASTER_MODE_SELECT \ ((uint32_t)(((I2C_SR2_MSL | I2C_SR2_BUSY) << 16) | I2C_SR1_SB)) +#define I2C_EV5_MASTER_MODE_SELECT_NO_BUSY \ + ((uint32_t)((I2C_SR2_MSL << 16) | I2C_SR1_SB)) + #define I2C_EV6_MASTER_TRA_MODE_SELECTED \ ((uint32_t)(((I2C_SR2_MSL | I2C_SR2_BUSY | I2C_SR2_TRA) << 16) | \ I2C_SR1_ADDR | I2C_SR1_TXE)) @@ -252,6 +255,7 @@ static void i2c_lld_serve_event_interrupt(I2CDriver *i2cp) { done by the DMA.*/ switch (I2C_EV_MASK & (event | (regSR2 << 16))) { case I2C_EV5_MASTER_MODE_SELECT: + case I2C_EV5_MASTER_MODE_SELECT_NO_BUSY: if ((i2cp->addr >> 8) > 0) { /* 10-bit address: 1 1 1 1 0 X X R/W */ dp->DR = 0xF0 | (0x6 & (i2cp->addr >> 8)) | (0x1 & i2cp->addr); diff --git a/readme.txt b/readme.txt index e47926f02..0b8ed26bc 100644 --- a/readme.txt +++ b/readme.txt @@ -154,6 +154,8 @@ - HAL: Added a new interface for range-finder devices (used by EX). - HAL: Added mcuconf.h updater tool for STM32F407 (backported to 19.1.1). - NIL: Integrated NIL 4.0. +- FIX: Fixed I2Cv1 extra interrupts (bug #1064) + (backported to 19.1.4)(backported to 18.2.3). - FIX: Fixed I2C4 broken on STM32H7xx (bug #1063) (backported to 19.1.4)(backported to 18.2.3). - FIX: Fixed I2C fallback driver broken (bug #1061)