BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
724 / 1149
Rev.1.02
Fig. 19-126 Flowchart of data reception
data reception
data reception completes.
wait for transission comppletion
(clear interrupt request flag)
generate stop condition
address field transmit
completes.
stop operation in order to modify
SCRmn register
set STmn bit to 1.
write "0" to TXEmn bit, write "1" to RXEmn bit
set SSmn bit to 1.
received last data?
write '0' to SOEmn bit
write virtual data (FFH) to
SIOr (SDRmn[7:0])
does transmission
completion interrupt
occur?
No
read SIOr(SDRmn[7:0])
No
data transmission
completes?
No
cofigure channel operation mode to
receiving
restart operation
disable outupt in order not to
acknowledge the last piece of data.
start receiving operation
read receiving data count, and
processing (store into RAM..etc)
Note that the ACK
(NACK
) is not output when the last data is received
. Thereafter, the operation is first stopped by
placing the
STmn
position
"1"
of the
serial channel stop register
m(STm
),
and then the stop condition is
generated to end the communication.