Start
Initialize
Set MST = 0
1
2
and TRS = 0 in ICCR
Write ACKB = 0 in ICSR
Read IRIC in ICSR
No
IRIC = 1?
Yes
Clear IRIC in ICSR
Read AAS and ADZ in ICSR
No
AAS = 1
and ADZ = 0?
General call address processing
* Description omitted
Yes
Read TRS in ICCR
No
TRS = 0?
Yes
Slave transmit mode
Yes
Last receive?
No
1. Select slave receive mode.
Read ICDR
3
4
2. Wait for the first byte to be received.
3. Start receiving. The first read is a dummy read.
4. Wait for the transfer to end.
Read IRIC in ICSR
IRIC = 1?
No
5. Set acknowledgement data for the last receive.
6. Start the last receive.
Yes
Clear IRIC in ICSR
7. Wait for the transfer to end.
8. Read the last receive data.
5
6
Set ACKB = 1 in ICSR
Read ICDR
Read IRIC in ICSR
7
No
IRIC = 1?
Yes
Clear IRIC in ICSR
8
Read ICDR
End
Figure 13.15 Flowchart for Slave Receive Mode (Example)
308