Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  12   SERIAL  ARRAY  UNIT 
R01UH0305EJ0200  Rev.2.00 
 
 
454  
Jul 04, 2013 
Figure 12-37.  Flowchart of Master Reception (in Single-Reception Mode) 
 
Starting CSI communication
Writing dummy data to 
SIOp (=SDRmn[7:0]) 
Write 1 to STmn bit
All reception completed?
No 
Yes 
End of communication
Reading receive data from 
SIOp (=SDRmn[7:0])
For the initial setting, see Figure 12-34.  
(Select Transfer end interrupt)
 
SAU default setting
Wait for receive completes
When transfer end interrupt is generated, it moves 
to interrupt processing routine 
 
Writing to SIOp makes SCKp signals out 
(communication starts)
 
 
RETI 
Transfer end interrupt 
generated? 
Setting receive data
Setting storage area of the receive data, number of communication data 
(Storage area, Reception data pointer, Number of communication data and 
Communication end flag are optionally set on the internal RAM by the software) 
 
Read receive data then writes to storage area.   
Update receive data pointer and number of 
communication data. 
Enables interrupt 
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set 
interrupt enable (EI) 
Disable interrupt (MASK)
Check the number of communication data 
Main routine 
Main r
outine
In
te
rr
u
pt
 p
roc
es
sin
g
ro
u
tin
e
 
 
Remark  m: Unit number (m = 0, 1), n: Channel number (n = 0 to 3), p: CSI number (p = 00, 01, 10, 11, 20, 21), 
mn = 00 to 03, 10, 11 
 
<R>