Simultaneous Serial Data Transmission And Reception (Clock Synchronous Mode) - Renesas RZ/A Series User Manual

Hide thumbs Also See for RZ/A Series:
Table of Contents

Advertisement

RZ/A1L Group, RZ/A1LU Group, RZ/A1LC Group
15.5.6
Simultaneous Serial Data Transmission and Reception (Clock Synchronous
Mode)
Figure 15.24 shows a sample flowchart for simultaneous serial transmit and receive operations in clock synchronous
mode.
After initializing the SCI, 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, check that the SCI has finished transmission
by reading that the TEND flag in SSR is 1, and then initialize the SCR register. Then set the TIE, RIE, TE, and RE bits in
SCR to 1 simultaneously by a single instruction.
To switch from receive mode to simultaneous transmit and receive mode, check that the SCI has finished reception, and
then clear the RIE and RE bits to 0. Then check that the receive error flags (ORER, FER, and PER in SSR) are 0, and
then set the TIE, RIE, TE, and RE bits in SCR to 1 simultaneously by a single instruction.
Initialization
Start data transmission/reception
No
TXI interrupt
Write transmit data to TDR
Read ORER flag in SSR
SSR.ORER = 1
No
RXI interrupt
Read receive data in RDR
No
All data received?
Clear TIE, RIE, TE, RE, and TEIE
bits in SCR to 0
Note: • When switching from transmit or receive operation to simultaneous transmit and receive operations , first clear the
TIE, RIE, TE, RE, and TEIE bits in SCR to 0, and then set TIE, RIE, TE, and RE bits to 1 simultaneously.
Figure 15.24
Example of Simultaneous Serial Transmission and Reception Flowchart
(Clock Synchronous Mode)
R01UH0437EJ0600 Rev.6.00
Jan 29, 2021
[ 1 ]
Yes
[ 2 ]
Yes
No
Error processing
Yes
[ 4 ]
[ 5 ]
Yes
<End>
[ 1 ] Initialization:
The TXDn pin can act as the output pin for
transmitted data and the RXDn pin can act as
the input pin for received data at the same time.
[ 2 ] Transmit data write:
Write transmit data to TDR once in the TXI
interrupt request processing routine.
[ 3 ] Receive error processing:
If a receive error occurs, read the ORER flag in
SSR, perform the relevant error processing, and
then clear the ORER flag to 0. Data reception
cannot be resumed while the ORER flag is 1.
[ 4 ] Reading receive data:
Read the receive data in RDR once in the RXI
interrupt request processing routine.
[ 3 ]
[ 5 ] Serial transmission/reception continuation
procedure:
To continue serial transmission and reception,
before the MSB (bit 7) of the current frame is
received, finish reading the receive data in RDR
by the RXI interrupt. Also, before the MSB (bit
7) of the current frame is transmitted, write data
to TDR by the TXI interrupt.
Transmit data can also be written to TDR by
activating the DMAC by a transmit data empty
interrupt (TXI) request. Similarly, the RDR data
can also be read by activating the DMAC by a
receive data full interrupt (RXI) request.
15. Serial Communications Interface
15-46

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rz/a1 seriesRz/a1lu seriesRz/a1lc series

Table of Contents