We need to set the MCLKOCNT (I2C Master Clock Low Timeout Count) to a sensible value, then check for the interrupt flag being set in the raw interrupt status register. This will indicate the slave has pulled clock low for too long, and we can then abort the transaction.
Currently we will not spot this an spin indefinitely. This can occur if the slave goes wrong and clock stretches for too long, or if the bus is pulled low instead of high.
We need to set the MCLKOCNT (I2C Master Clock Low Timeout Count) to a sensible value, then check for the interrupt flag being set in the raw interrupt status register. This will indicate the slave has pulled clock low for too long, and we can then abort the transaction.
Currently we will not spot this an spin indefinitely. This can occur if the slave goes wrong and clock stretches for too long, or if the bus is pulled low instead of high.