732
Master receive mode
Set TRS = 0 in ICCR
Set ACKB = 0 in ICSR
Last receive?
Read ICDR
Read IRIC in ICCR
Clear IRIC in ICCR
IRIC = 1?
Yes
No
No
Yes
Set ACKB = 1 in ICSR
Read ICDR
Read IRIC in ICCR
IRIC = 1?
Clear IRIC in ICCR
Clear IRIC in ICCR
Set TRS = 1 in ICCR
Read ICDR
Write BBSY = 0
and SCP = 0 in ICCR
End
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
Yes
No
[1] Select receive mode.
[2] Set acknowledge data.
[3] Start receiving. The first read is a dummy read.
[4] Wait for 1 byte to be received.
[5] Set acknowledge data for the last receive.
[6] Start the last receive.
[7] Wait for 1 byte to be received.
[8] Select transmit mode.
[9] Read the last receive data (if ICDR is read
without selecting transmit mode, receive
operations will resume).
[10] Generate a stop condition.
Figure 18-15 Flowchart for Master Receive Mode (Example)