R01UH0823EJ0100 Rev.1.00
Page 1056 of 1823
Jul 31, 2019
RX23W Group
33. Serial Communications Interface (SCIg, SCIh)
shows a sample flowchart of serial transmission.
Figure 33.41
Sample Smart Card Interface Transmission Flowchart
All the processing steps are automatically performed using a TXI interrupt request to activate the DTC or DMAC.
When the TEND flag in the SSR register is set to 1 in transmission, if the TIE bit in the SCR register is 1, a TXI interrupt
request is generated. The DTC or DMAC is activated by a TXI interrupt request if the TXI interrupt request is specified
as a source of DTC or DMAC activation beforehand, allowing transfer of transmit data. The TEND flag is automatically
set to 0 when the DTC or DMAC transfers the data.
If an error occurs, the SCI automatically retransmits the same data. During this retransmission, the TEND flag is kept to
0 and the DTC or DMAC is not activated. Therefore, the SCI and DTC or DMAC automatically transmit the specified
number of bytes, including retransmission in the case of error occurrence. However, since the ERS flag is not
automatically cleared, set the RIE bit to 1 beforehand to enable an ERI interrupt request to be generated at error
occurrence, and clear the ERS flag to 0.
Initialization
No
Yes
Set bits TIE, RIE, and TE
in SCR to 0
Start data transmission
Start
No
No
No
Yes
Yes
Yes
Yes
No
End
TXI interrupt
Error processing
Error processing
SSR.ERS flag = 0?
All transmit data written?
TXI interrupt
SSR.ERS flag = 0?
Write transmit data to TDR