16.1 The TWI/TWIHS Clear command does not work
Bus reset using the “CLEAR” bit of the TWI/TWIHS control register does not work correctly during a bus busy state.
Work around
When the TWI master detects the SDA line stuck in low state the procedure
to recover is:
- Reconfigure the SDA/SCL lines as PIO.
- Try to assert a Logic 1 on the SDA line (PIO output = 1).
- Read the SDA line state. If the PIO state is a Logic 0, then generate a clock pulse on SCL (1-0-1 transition).
- Read the SDA line state. If the SDA line = 0, go to Step 3; if SDA = 1, go to Step 5.
- Generate a STOP condition.
- Reconfigure SDA/SCL PIOs as peripheral.