20.5.6.1 SCL Low Timeout (tTIMEOUT)
SCL low timeout (tTIMEOUT) allows a host or client to conclude that a defective device is holding the clock low indefinitely or that a host is intentionally trying to drive devices off the bus. It is highly recommended that a client device release the bus when it detects any single clock held low longer than tTIMEOUT, MIN. Devices that have detected this condition must reset their communication interface and be able to receive a new Start condition in no later than tTIMEOUT, MAX.
SCL low timeout can be enabled by writing the timeout value to BSCLTOTMR
(I2CxBSCLTO[23:0]) and then setting the BSCLTE (I2CxCON2[27]) bit. The timer will
continue to run until SCL stays low or the timer value reloads. If the timer reaches
0
before reloading, then the timeout BSCLTO (I2CxSTAT2[23]) flag
and ERR (I2CxSTAT2[11]) are set. The BSCLTIE (I2CxINTC[23]) bit can be enabled to
generate an error interrupt (I2CxEIF).
When timeout occurs in Client mode:
- SCL will be released
(SCLREL=
1
), irrespective of STREN, by hardware automatically - SSPND (I2CxSTAT2[31]) will be cleared
- SDA will be released after SCL based on the SDASU timer value specification
- CLTACT (I2CxSTAT2[30]) will be cleared
When timeout occurs in Host mode:
- SSPND (I2CxSTAT2[31]) will be cleared
- Hardware automatically sends Stop bit to terminate the current transaction