English
Language : 

SAMA5D42_14 Datasheet, PDF (1205/1776 Pages) ATMEL Corporation – Atmel | SMART ARM-based Embedded MPU
40.7.5.7 Read Write Flowcharts
The flowchart shown in Figure 40-32 gives an example of read and write operations in slave mode. A polling or
interrupt method can be used to check the status bits. The interrupt method requires that the Interrupt Enable
Register (TWI_IER) be configured first.
Figure 40-32. Read Write Flowchart in Slave Mode
Set the SLAVE mode:
SADR + MSDIS + SVEN
Read Status Register
SVACC = 1 ?
No
No
EOSACC = 1 ?
No
TXCOMP = 1 ?
END
GACC = 1 ?
No
SVREAD = 0 ?
No
TXRDY= 1 ?
No
RXRDY= 0 ?
Write in TWI_THR
No
Read TWI_RHR
GENERAL CALL TREATMENT
Decoding of the
programming sequence
Prog seq
No
OK ?
Change SADR
SAMA5D4 Series [DATASHEET]
Atmel-11238A-ATARM-SAMA5D4-Datasheet_30-Sep-14
1205