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:
  1. Reconfigure the SDA/SCL lines as PIO.
  2. Try to assert a Logic 1 on the SDA line (PIO output = 1).
  3. Read the SDA line state. If the PIO state is a Logic 0, then generate a clock pulse on SCL (1-0-1 transition).
  4. Read the SDA line state. If the SDA line = 0, go to Step 3; if SDA = 1, go to Step 5.
  5. Generate a STOP condition.
  6. Reconfigure SDA/SCL PIOs as peripheral.