Skip to content

Commit 04fa77f

Browse files
committed
increase timeout for slow slaves that use clock extensive stretching
1 parent 044b513 commit 04fa77f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D5M/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.00
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -103,7 +103,7 @@ int i2c_stop(i2c_t *obj) {
103103
}
104104

105105
static int timeout_status_poll(i2c_t *obj, uint32_t mask) {
106-
uint32_t i, timeout = 1000;
106+
uint32_t i, timeout = 100000;
107107

108108
for (i = 0; i < timeout; i++) {
109109
if (obj->i2c->S & mask)

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/i2c_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int i2c_stop(i2c_t *obj) {
103103
}
104104

105105
static int timeout_status_poll(i2c_t *obj, uint32_t mask) {
106-
uint32_t i, timeout = 1000;
106+
uint32_t i, timeout = 100000;
107107

108108
for (i = 0; i < timeout; i++) {
109109
if (obj->i2c->S & mask)

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/i2c_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int i2c_stop(i2c_t *obj) {
8383
}
8484

8585
static int timeout_status_poll(i2c_t *obj, uint32_t mask) {
86-
uint32_t i, timeout = 1000;
86+
uint32_t i, timeout = 100000;
8787

8888
for (i = 0; i < timeout; i++) {
8989
if (HW_I2C_S_RD(obj->instance) & mask)

0 commit comments

Comments
 (0)