Skip to content

Commit a7b3042

Browse files
committed
decrease i2c timeout
1 parent effce37 commit a7b3042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/drivers/bus_i2c_atbsp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "drivers/bus_i2c_impl.h"
3939

4040
//#define I2C_TIMEOUT 0x3FFFFF
41-
#define I2C_TIMEOUT 0x8700 //about 120 us at 288 mhz
41+
#define I2C_TIMEOUT 0x870 //about 7 us at 288 mhz
4242

4343
#ifdef USE_I2C_DEVICE_1
4444
void I2C1_ERR_IRQHandler(void)
@@ -287,7 +287,7 @@ bool i2cReadBuffer(I2CDevice device, uint8_t addr_, uint8_t reg_, uint8_t len, u
287287
else
288288
{
289289
/* wait for the communication to end */
290-
i2c_wait_end(pHandle->i2cx, I2C_TIMEOUT);
290+
// i2c_wait_end(pHandle->i2cx, I2C_TIMEOUT);
291291
}
292292

293293

0 commit comments

Comments
 (0)