RL78/G1P
CHAPTER 11 SERIAL ARRAY UNIT
R01UH0895EJ0100 Rev.1.00
367
Nov 29, 2019
Figure 11-47. Flowchart of Master Transmission/Reception (in Continuous Transmission/Reception Mode)
Starting setting
Wait for transmission/
reception completes
Clear interrupt request flag (XXIF), reset interrupt mask
(XXMK) and set interrupt enable (EI)
Reading reception data to
SIOp (= SDRmn [7:0])
Setting
transmission/reception data
Setting storage data and number of data for transmission/reception
data
(Storage area, Transmission data pointer, Reception data, Number
of communication data and Communication end flag are optionally
set on the internal RAM by the software)
Enables interrupt
Writing dummy data to
SIOp (= SDRmn [7:0])
BFFmn = 1?
Buffer empty/transfer end interrupt
When transmission/reception interrupt is
generated, it moves to interrupt processing
routine
No
Except for initial interrupt, read data received
then write them to storage area, and update
receive data pointer
Yes
<1>
<2>
<3><6>
End of communication
Disable interrupt (MASK)
Subtract -1 from number of
transmit data
Number of
communication data?
RETI
Number of communication
data = 0?
Yes
Write MDmn0 bit to 1
Continuing Communication?
<4>
<7>
<5>
No
SAU default setting
= 0
≥
2
No
Yes
= 1
Read transmit data from storage area and write it
to SIOp. Update transmit data pointer.
Writing transmit data to
SIOp (= SDRmn [7:0])
Clear MDmn0 bit to 0
Writing to SIOp makes
Sop and SCKp signals out
(communication starts)
If transmit data is left (number of communication
data is equal or grater than 2), read them from
storage area then write into SIOp, and update
transmit data pointer.
If it’s waiting for the last data to receive (number of
communication data is equal to 1), change
interrupt timing to communication end
Write STmn bit to 1
<8>
Main routine
Interrupt processing routine
Main routine
For the initial setting, refer to Figure 11-41.
(Select buffer empty interrupt)
Remark
<1> to <8> in the figure correspond to <1> to <8> in
Figure 11-46 Timing Chart of Master
Transmission/Reception (in Continuous Transmission/Reception Mode)
.