Starting UART communication
End of communication
Disable interrupt (MASK)
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
).
Clear interrupt request flag (xxIF),
reset interrupt mask (xxMK) and
set interrupt enable (EI).
Read transmit data from storage area and write it to
TXDq. Update transmit data pointer.
Setting transmit data
Enables interrupt
Wait for transmit completes
Writing transmit data to
the SDRmn[7:0] bits (TXDq register) (8 bits
) or
the SDRmn[8:0] bits (9 bits)
Transmission completed?
Yes
RETI
Transmitting next data?
Yes
Transfer end interrupt
SAU initial setting
Communication starts by writing to
SDRmn[7:0].
When Transfer end interrupt is generated,
it moves to interrupt processing routine.
No
Read transmit data, if any, from storage area and
write it to TXDq. Update transmit data pointer.
If not, set transmit end flag.
Check completion of transmission by
verifying transmit end flag.
Main routine Interrupt processing routine Main routine
Set STmn bit to 1
Sets communication completion flag
Writing transmit data to
the SDRmn
[7:0]
bits (TXDq register) (8 bits) or
the SDRmn[8:0] bits (9 bits)