
 698
SAM4CP [DATASHEET]
43051E–ATPL–08/14
Clock Synchronization in Write Mode
The clock is tied low outside of the acknowledge phase if the internal shifter and the TWI_RHR is full. If a STOP or
REPEATED START condition was not detected, it is tied low until TWI_RHR is read.
Figure 34-30
 describes the clock synchronization in Write mode.
Figure 34-30.  Clock Synchronization in Write Mode
Notes: 1.
At the end of the read sequence, TXCOMP is set after a STOP or after a REPEATED START + an address
different from SADR.
SCLWS is automatically set when the clock synchronization mechanism is started and automatically reset
when the mechanism is finished.
2.
Reversal after a Repeated Start
Reversal of Read to Write
The master initiates the communication by a read command and finishes it by a write command.
Figure 34-31
 describes the repeated start + reversal from Read to Write mode.
Figure 34-31.  Repeated Start + Reversal from Read to Write Mode
Notes: 1.
TXCOMP is only set at the end of the transmission because after the repeated start, SADR is detected
again.
Rd DATA0
Rd DATA1
Rd DATA2
SVACC
SVREAD
RXRDY
SCLWS
TXCOMP
DATA1
DATA2
SCL is stretched on the last bit of DATA1
As soon as a START is detected
TWCK
TWD
TWI_RHR
CLOCK is tied low by the TWI as long as RHR is full
DATA0 is not read in the RHR
ADR
S
SADR
W
A
DATA0
A
A
DATA2
DATA1
S
NA
S
SADR
R
A
DATA0
A
DATA1
SADR
Sr
NA
W
A
DATA2
A
DATA3
A
P
Cleared after read
DATA0
DATA1
DATA2
DATA3
SVACC
SVREAD
TXRDY
TWD
TWI_THR
TWI_RHR
EOSACC
RXRDY
TXCOMP
As soon as a START is detected