Meaning
Bidirectional flow control mechanisms that allow subordinate devices to pause serial communication by holding the shared synchronization line low govern inter-integrated circuit bus timing. During transmission, i2c clock stretching permits a peripheral device to delay the controller by extending the clock cycle until internal processing or data collection completes. The mechanism applies exclusively to open-drain, two-wire communication transactions, terminating when the subordinate driver releases the line and permits a passive pull-up resistor to pull the voltage back to the logic-high rail.
High-speed serial interfaces like SPI or UART do not support this shared-line pause mechanism.
Line Assertion
Subordinate transceivers pull the open-drain clock trace to ground during the acknowledge phase or between data bytes. When i2c clock stretching begins, the bus controller detects the sustained low state through its own input receiver buffer before advancing its state machine. Pull-up resistor values and total capacitive loading dictate the rise time once the subordinate releases the trace.
Slow rise times caused by excessive bus capacitance can be misinterpreted as active stretching. The line remains low until internal analog-to-digital conversions or flash buffer writes complete.
Bus Deadlock
Hardware faults and unhandled firmware exceptions in subordinate devices cause unrecoverable bus freezes when the clock line is held low indefinitely. If a microcontroller resets or enters a sleep state while executing i2c clock stretching, the open-drain low-side transistor stays engaged, preventing any subsequent bus transactions across all connected nodes. Controller hardware lacks dedicated reset pins for peripheral devices sharing a two-wire bus interface.
Power cycling the subordinate device or toggling its dedicated reset line represents the primary physical remedy for persistent line grounding. Board layouts incorporate programmable power switches to drop the sub-circuit rail when subordinate chips latch the bus low.
Master Timeout
Protocol controller state machines implement bounded timeout counters to handle unresponsive slave peripherals during extended clock pauses. A defensive communication driver tracks the duration of i2c clock stretching and terminates the active transaction if the peripheral exceeds a predetermined microsecond threshold. Upon timing out, the bus controller aborts the current transfer and initiates a recovery sequence by generating nine consecutive clock pulses to clear hung shift registers.
Failing to handle excessive clock low intervals causes entire operating system driver queues to lock up while waiting for a hardware peripheral that will never release the trace. Peripheral datasheets define maximum stretching durations, enabling embedded software engineers to tune driver timeout registers to prevent false transaction failures. Reliable communication stacks monitor bus health continuously, resetting frozen peripherals before i2c clock stretching stalls telemetry streams completely.