4.4 Avoiding Deadlocks
Setting up a Bus Timeout is the best way to avoid deadlocks on an I2C bus. If a deadlock does occur for whatever reason, the MCU can respond by resetting its I2C controller and/or generating an interrupt. The interrupt could be used to reset devices on the bus to resolve the error. Some MCUs have built-in Bus Timeout features in the I2C hardware, while others will emulate it with either a dedicated hardware timer or a software-defined timer.