R01UH0823EJ0100 Rev.1.00
Page 1059 of 1823
Jul 31, 2019
RX23W Group
33. Serial Communications Interface (SCIg, SCIh)
shows a sample flowchart for serial data reception.
Figure 33.44
Sample Smart Card Interface Reception Flowchart
All the processing steps are automatically performed using an RXI interrupt request to activate the DTC or DMAC.
In reception, setting the RIE bit to 1 allows an RXI interrupt request to be generated. The DTC or DMAC is activated by
an RXI interrupt request if the RXI interrupt request is specified as a source of DTC or DMAC activation beforehand,
allowing transfer of receive data.
If an error occurs during reception and either the ORER or PER flag in the SSR register is set to 1, a receive error
interrupt (ERI) request is generated. Clear the error flag after the error occurrence. If an error occurs, the DTC or DMAC
is not activated and receive data is skipped. Therefore, the number of bytes of receive data specified in the DTC or
DMAC is transferred.
Even if a parity error occurs and the PER flag is set to 1 during reception, receive data is transferred to RDR, thus
allowing the data to be read.
When a reception is forcibly terminated by setting the SCR.RE bit to 0 during operation, read the RDR register because
the received data which has not yet been read may be left in RDR.
Note 1. For operations in block transfer mode, refer to section 33.3, Operation in Asynchronous Mode.
Initialization
Read data from RDR
Set bits RIE and RE
in SCR to 0
Start data reception
Start
Error processing
No
No
No
Yes
Yes
SSR.ORER = 0 and
SSR.PER = 0?
RXI interrupt
All data received?
Yes