Communication Failure
A communication fault on a two-wire serial bus occurs when one of the connected devices holds the data or clock line low indefinitely. This state, known as an I2C bus lockup, prevents the master device from initiating new transfers or generating stop conditions. It typically happens when a slave device is interrupted during a read command, leaving its output driver in a low-impedance state.
Metrological Integrity
Sensors that cannot transmit their readings because of a bus freeze will cause the controller to use stale data or fail entirely. When an I2C bus lockup occurs, the system ability to monitor real-time physical variables is lost. To detect this condition, the controller implements a bus timeout counter that monitors the duration of the low state.
If the line remains low for longer than the specified limit, a recovery sequence is triggered.
Recovery Sequence
Resolving the blocked state requires the master to generate up to nine clock pulses on the serial clock line to force the slave to release the data line. This action simulates the transmission of a data byte, causing the slave to complete its interrupted cycle. Once the data line is released, the master generates a stop condition to reset the bus.
This procedure must be executed before attempting to read any further data from the sensor. A failure to release the line after the recovery sequence indicates a hardware fault that requires a full power cycle.
Prevention Design
Hardware designers use pull-up resistors of appropriate values to ensure clean rise times and prevent noise-triggered failures. Using software timeouts and dedicated reset lines for the slave devices also reduces the likelihood of a persistent bus lockup. These precautions are checked during the initial validation of the sensor board.