R01UH0822EJ0100 Rev.1.00
Page 674 of 1041
Jul 31, 2019
RX13T Group
23. Serial Communications Interface (SCIg, SCIh)
shows a sample flowchart of serial transmission.
Figure 23.40
Sample Smart Card Interface Transmission Flowchart
All the processing steps are automatically performed using a TXI interrupt request to activate the DTC.
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 is activated by a TXI interrupt request if the TXI interrupt request is specified as a source
of DTC activation beforehand, allowing transfer of transmit data. The TEND flag is automatically set to 0 when the DTC
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 is not activated. Therefore, the SCI and DTC 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