English
Language : 

SAM9G46_14 Datasheet, PDF (519/1286 Pages) ATMEL Corporation – Atmel | SMART ARM-based Embedded MPU
Figure 30-31. Repeated Start + Reversal from Write to Read Mode
TWI_THR
DATA2
DATA3
TWD
S SADR W A DATA0 A DATA1 A Sr SADR R A DATA2 A DATA3 NA P
TWI_RHR
SVACC
SVREAD
TXRDY
RXRDY
EOSACC
TXCOMP
DATA0
Read TWI_RHR
As soon as a START is detected
DATA1
Cleared after read
Notes: 1. In this case, if TWI_THR has not been written at the end of the read command, the clock is automatically stretched before
the ACK.
2. TXCOMP is only set at the end of the transmission because after the repeated start, SADR is detected again.
30.10.6 Read Write Flowcharts
The flowchart shown in Figure 30-32 on page 520 gives an example of read and write operations in Slave mode. A
polling or interrupt method c an be used to check the status bits. The interrupt method requires that the interrupt
enable register (TWI_IER) be configured first.
SAM9G46 Series [DATASHEET]
Atmel-11028F-ATARM-SAM9G46-Datasheet_16-Oct-14
519