SAU default setting
Starting UART
communication
Wait for transmit completes
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK)
and set interrupt enable (EI).
Writing transmit data to the SDRmn
[7:0] bits (TXDq register)
Yes
No
Setting transmit data
Set data for transmission and the number of data . Clear communication end flag
(Storage area, Transmission data pointer, Number of communication data and
Communication end flag are optionally set on the internal RAM by the software ).
Enables interrupt
Writing transmit data to the SDRmn
[7:0] bits (TXDq register)
Read transmit data from storage area and write it to TXDq.
Update transmit data pointer.
Communication starts by writing to
SDRmn [7:0].
Number of
communication data > 0?
Buffer empty/
transfer end interrupt
When buffer empty/transfer end interrupt is
generated, it moves to interrupt processing
routine.
No
If transmit data is left, read them from
storage area then write into TxDq, and
update transmit data pointer and number of
transmit data.
If no more transmit data, clear MDmn bit if
it’s set. If not, finish.
Check completion of transmission by
verifying transmit end flag
Yes
End of communication
RETI
Transmission completed?
Disable interrupt (MASK)
Communication
continued?
Subtract -1 from number of
transmit data
Yes
No
MDmn = 1?
Clear MDmn0 bit to 0
Sets communication
completion interrupt flag
Yes
No
<1>
<2>
<3>
Yes
<2>
<4>
<5>
Write STmn bit to 1<6>
Write MDmn0 bit to 1
Main routineInterrupt processing routineMain routine
For the initial setting, refer to Figure 14 - 73.
(Select buffer empty interrupt)