summaryrefslogtreecommitdiff
path: root/chip/stm32/i2c-stm32f.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/i2c-stm32f.c')
-rw-r--r--chip/stm32/i2c-stm32f.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/chip/stm32/i2c-stm32f.c b/chip/stm32/i2c-stm32f.c
index 6c7f58556c..851209557b 100644
--- a/chip/stm32/i2c-stm32f.c
+++ b/chip/stm32/i2c-stm32f.c
@@ -44,9 +44,13 @@
* mode). The slave is supposed to wait forever for the master to read bytes.
* ...but we're going to keep the timeout to make sure we're robust. It may in
* fact be needed if the host resets itself mid-read.
+ *
+ * NOTE: One case where this timeout is useful is when the battery
+ * flips out. The battery may flip out and hold lines low for up to
+ * 25ms. If we just wait it will eventually let them go.
*/
#define I2C_TX_TIMEOUT_SLAVE (100 * MSEC)
-#define I2C_TX_TIMEOUT_MASTER (10 * MSEC)
+#define I2C_TX_TIMEOUT_MASTER (30 * MSEC)
/*
* We delay 5us in bitbang mode. That gives us 5us low and 5us high or