English
Language : 

SAM4CM_14 Datasheet, PDF (742/1177 Pages) ATMEL Corporation – Atmel | SMART ARM-based Flash MCU
Figure 34-33. 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
No
TXRDY= 1 ?
RXRDY= 0 ?
Write in TWI_THR
No
Read TWI_RHR
GENERAL CALL TREATMENT
Decoding of the
programming sequence
Prog seq
No
OK ?
Change SADR
34.7.6 Register Write Protection
To prevent any single software error from corrupting TWI behavior, certain registers in the address space can be
write-protected by setting the WPEN bit in the TWI Write Protection Mode Register (TWI_WPMR).
If a write access to a write-protected register is detected, the WPVS flag in the TWI Write Protection Status
Register (TWI_WPSR) is set and the WPVSRC field shows the register in which the write access has been
attempted.
The WPVS bit is automatically cleared after reading the TWI_WPSR.
The following registers can be write-protected:
 TWI Slave Mode Register
 TWI Clock Waveform Generator Register
742
SAM4CM Series [DATASHEET]
Atmel-11203C-ATARM-SAM4CM32-SAM4CM16-SAM4CM8-Datasheet_06-Oct-14