
V PeRiPheRaL MoDuLes 3 (inteRFaCe): GeneRaL-PuRPose seRiaL inteRFaCe (eFsio)
V-1-34
ePson
s1C33L17 teChniCaL ManuaL
(4) terminating transmit operations
When data transmission is completed, write 0 to the transmit-enable bit TXEN1 (D7/0x300B13) to disable
transmit operations. This operation clears (initializes) the transmit data buffer (FIFO), therefore, make sure
that the transmit data buffer does not contain any data waiting for transmission before writing 0 to TXEN1
(D7/0x300B13).
To disable clock output, first reset CLKOEN1 (D4/0x300B1A) to 0 and then CLKOL1 (D3/0x300B1A) to 0.
Receive control
(1) Clock output
Start clock output in the following procedure if it is disabled:
1. Set CLKOL1 (D3/0x300B1A) to 1 (forced low output is released).
2. Set CLKOEN1 (D4/0x300B1A) to 1 (clock output begins).
CLKoL1: Serial I/F Ch.1 Clock Output Forced Low Bit in the Serial I/F Ch.1 ISO7816 Mode Control Register
(D3/0x300B1A)
CLKoen1: Serial I/F Ch.1 Clock Output Enable Bit in the Serial I/F Ch.1 ISO7816 Mode Control Register
(D4/0x300B1A)
(2) enabling receive operations
Use the receive-enable bit RXEN1 (D6/0x300B13) for receive control.
When receiving enabled by writing 1 to this bit, clock input to the shift register is enabled (ready for input),
meaning that it is ready to receive data. Receive operations are disabled and the receive data buffer (FIFO) is
cleared by writing 0 to RXEN1 (D6/0x300B13).
RXen1: Serial I/F Ch.1 Receive Enable Bit in the Serial I/F Ch.1 Control Register (D6/0x300B13)
note: Do not set RXEN1 (D6/0x300B13) to 0 during a receive operation.
(3) Receive procedure
This serial interface has a receive shift register, receive data buffer and a receive data register that are provided
independently of those used for transmit operations.
The received data enters the received data buffer. The receive data buffer is a 4-byte FIFO and can receive data
until it becomes full unless the received data is not read out.
The received data in the buffer can be read by accessing RXD1[7:0] (D[7:0]/0x300B11). The older data is out-
put first and cleared by reading.
RXD1[7:0]: Serial I/F Ch.1 Receive Data Bits in the Serial I/F Ch.1 Receive Data Register (D[7:0]/0x300B11)
The number of data in the receive data buffer can be checked by reading RXD1NUM[1:0] (D[7:6]/0x300B12).
When RXD1NUM[1:0] (D[7:6]/0x300B12) is 0, the buffer contains 0 or 1 data. When RXD1NUM[1:0]
(D[7:6]/0x300B12) is 1–3, the buffer contains 2–4 data.
RXD1nuM[1:0]: Number of Ch.1 Receive Data in FIFO in the Serial I/F Ch.1 Status Register (D[7:6]/0x300B12)
Furthermore, RDBF1 (D0/0x300B12) is provided for indicating whether the receive data buffer is empty or not.
This flag is set to 1 when the receive data buffer contains one or more received data, and is reset to 0 when the
receive data buffer becomes empty by reading all the received data.
RDBF1: Serial I/F Ch.1 Receive Data Buffer Full Flag in the Serial I/F Ch.1 Status Register (D0/0x300B12)
When the receive data buffer has received the specified number or more data (one in standard mode or one to
four in advanced mode), a cause of the receive-buffer full interrupt occurs. Since an interrupt can be generated
as set by the interrupt controller, the received data can be read by an interrupt processing routine. In addition,
since this cause of interrupt can be used to invoke DMA, the received data can be received successively in loca-
tions prepared in memory through DMA transfers.
For details on how to control interrupts/DMA, refer to Section V.1.7, “Serial Interface Interrupts and DMA.”