Datasheet
2017 Microchip Technology Inc. DS60001516A-page 425
SAM9G20
Clock stretching information is given by the SCLWS (Clock Wait state) bit.
See Figure 30-27 and Figure 30-28.
• General Call
In the case where a GENERAL CALL is performed, GACC (General Call ACCess) flag is set.
After GACC is set, it is up to the programmer to interpret the meaning of the GENERAL CALL and to decode the new address programming
sequence.
See Figure 30-26.
30.6.5.5 PDC
As it is impossible to know the exact number of data to receive/send, the use of PDC is NOT recommended in SLAVE mode.
30.6.5.6 Data Transfer
• Read Operation
The read mode is defined as a data requirement from the master.
After a START or a REPEATED START condition is detected, the decoding of the address starts. If the slave address (SADR) is decoded,
SVACC is set and SVREAD indicates the direction of the transfer.
Until a STOP or REPEATED START condition is detected, TWI continues sending data loaded in the TWI_THR.
If a STOP condition or a REPEATED START + an address different from SADR is detected, SVACC is reset.
Figure 30-24 describes the write operation.
Figure 30-24: Read Access Ordered by a MASTER
Note 1: When SVACC is low, the state of SVREAD becomes irrelevant.
2: TXRDY is reset when data has been transmitted from TWI_THR to the shift register and set when this data has been acknowl-
edged or non acknowledged.
• Write Operation
The write mode is defined as a data transmission from the master.
After a START or a REPEATED START, the decoding of the address starts. If the slave address is decoded, SVACC is set and SVREAD
indicates the direction of the transfer (SVREAD is low in this case).
Until a STOP or REPEATED START condition is detected, TWI stores the received data in the TWI_RHR.
If a STOP condition or a REPEATED START + an address different from SADR is detected, SVACC is reset.
Figure 30-25 describes the Write operation.
Write THR
Read RHR
SVREAD has to be taken into account only while SVACC is active
TWD
TXRDY
NACK
SVACC
SVREAD
EOSVACC
SADRS ADR R NA R A DATA A A DATA NA S/SrDATA NA P/S/Sr
SADR matches,
TWI answers with an ACK
SADR does not match,
TWI answers with a NACK
ACK/NACK from the Master