← index #2419PR #2550
Related · high · value 0.938
QUERY · ISSUE

I2C bus recovery

openby deshipuopened 2016-09-14updated 2024-09-29
enhancementports

I wonder how useful would it be to add a bus recovery mechanism to the software I2C implementation. It would be something similar to what is discussed here: https://github.com/esp8266/Arduino/issues/1025

The particular use case is when either the slave or the master get reset in the middle of a transmission, and leave the bus in inconsistent state, usually with the other party pulling one of the lines down and preventing communication. This can easily happen when we are doing aggressive power management, entering deep sleep or cutting power to the sensors.

The proposed solution is to strobe the clock line several times and send a NACK, to make sure all the devices on the bus get to finish the last byte they were sending.

CANDIDATE · PULL REQUEST

extmod/machine_i2c: Make the clock stretching timeout configurable and raise errors when it times out

closedby deshipuopened 2016-10-22updated 2017-01-28

As per discussion in #1948.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied