A Stop condition occurs when SDA transitions from an Active state to an Idle state while SCL is idle. Master hardware will issue a Stop condition when it has completed its current transmission and is ready to release control of the bus. A Stop condition is also issued after an error condition occurs, such as a bus time-out, or when a NACK condition is detected on the bus.
1).
Master hardware then waits the duration of the Stop condition setup time
(TSU:STO) and releases SDA, setting the Stop Condition Interrupt Flag
(PCIF). If the Stop Condition Interrupt Enable
(PCIE) bit is also set, the generic I2CxIF is also
set.