English
Language : 

HD64F38602R Datasheet, PDF (302/552 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer
Section 14 Serial Communication Interface 3 (SCI3, IrDA)
14.5.5
Simultaneous Serial Data Transmission and Reception
Figure 14.14 shows a sample flowchart for simultaneous serial transmit and receive operations.
The following procedure should be used for simultaneous serial data transmit and receive
operations. To switch from transmit mode to simultaneous transmit and receive mode, after
checking that the SCI3 has finished transmission and the TDRE and TEND flags are set to 1, clear
TE to 0. Then simultaneously set TE and RE to 1 with a single instruction. To switch from receive
mode to simultaneous transmit and receive mode, after checking that the SCI3 has finished
reception, clear RE to 0. Then after checking that the RDRF and receive error flags (OER, FER,
and PER) are cleared to 0, simultaneously set TE and RE to 1 with a single instruction.
Start transmission/reception
Set SPC3 bit in SPCR to 1
[1] Read SSR and check that the TDRE
flag is set to 1, then write transmit data
Read TDRE flag in SSR
[1]
to TDR.
When data is written to TDR, the
No
TDRE = 1
TDRE flag is automatically cleared to
0.
[2] Read SSR and check that the RDRF
flag is set to 1, then read the receive
Yes
data in RDR.
Write transmit data to TDR
When data is read from RDR, the
RDRF flag is automatically cleared to
0.
Read OER flag in SSR
[3] To continue serial transmission/
reception, before the MSB (bit 7) of
the current frame is received, finish
OER = 1
Yes
[4]
reading the RDRF flag, reading RDR.
Also, before the MSB (bit 7) of the
current frame is transmitted, read 1
No
Overrun error processing
from the TDRE flag to confirm that
writing is possible. Then write data to
TDR.
Read RDRF flag in SSR
[2]
When data is written to TDR, the
TDRE flag is automatically cleared to
No
RDRF = 1
0. When data is read from RDR, the
RDRF flag is automatically cleared to
0.
[4] If an overrun error occurs, read the
Yes
OER flag in SSR, and after performing
Read receive data in RDR
the appropriate error processing, clear
the OER flag to 0.
Transmission/reception cannot be
resumed if the OER flag is set to 1.
Yes
Data transmission/reception
[3]
continued?
For overrun error processing, see
figure 14.13.
No
Clear TE and RE bits in SCR to 0
<End>
Figure 14.14 Sample Flowchart of Simultaneous Serial Transmit and Receive Operations
(Clock Synchronous Mode)
Rev. 3.00 May 15, 2007 Page 270 of 516
REJ09B0152-0300