Starting UART communication
End of communication
Disable interrupt (MASK)
Set the data pointer for transmission and the number of data items. 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)
Clear interrupt request flag (xxIF), reset interrupt mask (xxMK) and set interrupt
enable (EI).
Read transmit data from storage area and write to
TXDq. Update transmit data pointer.
Setting transmit data
Enables interrupt
Wait for transmit completes
Transmission completed?
RETI
Number of transmit data
> 0?
No
Buffer empty/transfer end interrupt
SAU initial setting
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 MDmn0 bit if it s set.
If not, finish.
Check completion of transmission by
verifying transmit end flag
Write 1 to STmn bit
Communication continued?
Write 1 to MDmn0 bit
Yes
Yes
No
Sets communication
completion interrupt flag
Subtract –1 from number of
communication data
MDmn0 = 1?
Yes
Clear MDmn0 bit to 0
No
Main routine Interrupt processing routine Main routine
<1>
<6>
Yes
Writing transmit data to
the SDRmn[7:0] bits (TXDq register) (8 bits) or
the SDRmn[8:0] bits (9 bits)
<2>
<5>
<3>
Writing transmit data to
the SDRmn[7:0] bits (TXDq register) (8 bits) or
the SDRmn[8:0] bits (9 bits)
<2>
Transmission starts by writing to the SDRmn[7:0]
bits (TXDq register) (8 bits) or the SDRmn[8:0] bits
(9 bits).
<4>