
V PeRiPheRaL MoDuLes 3 (inteRFaCe): GeneRaL-PuRPose seRiaL inteRFaCe (eFsio)
V-1-60
ePson
s1C33L17 teChniCaL ManuaL
V.1.9 Precautions
Before setting various serial-interface parameters, make sure the transmit and receive operations are disabled
(TXENx = RXENx = 0).
tXenx: Serial I/F Ch.x Transmit Enable Bit in the Serial I/F Ch.x Control Register (D7/0x300Bx3)
RXenx: Serial I/F Ch.x Receive Enable Bit in the Serial I/F Ch.x Control Register (D6/0x300Bx3)
When the serial interface is transmitting or receiving data, do not set TXENx or RXENx to 0, and do not execute
the slp instruction.
In clock-synchronized transfers, the mode of communication is half-duplex, in which the clock line is shared be-
tween the transmit and receive units. Therefore, RXENx and TXENx cannot be enabled simultaneously.
After an initial reset, the cause-of-interrupt flags become indeterminate. To prevent generation of an unwanted
interrupt or IDMA request, reset these flags in the program.
If a receive error occurs, the receive-error interrupt and receive-buffer full interrupt causes occur simultaneously.
However, since the receive-error interrupt has priority over the receive-buffer full interrupt, the receive-error in-
terrupt is processed first. Therefore, it is necessary to reset the receive-buffer full interrupt cause flag through the
use of the receive-error interrupt processing routine.
To prevent the regeneration of interrupts due to the same cause of interrupt following the occurrence of an inter-
rupt, always be sure to reset the cause-of-interrupt flag before setting the PSR again or executing the reti instruc-
tion.
Follow the procedure described below to initialize the serial interface.
Set IRMDx[1:0]
Set SMDx[1:0]
Other settings
Enable transmitting/receiving
00(normal I/F) or 10(IrDA I/F)
Transfer mode setting
Data format and clock selection
Internal division ratio, IrDA I/O logic
and other settings
Enable transmitting, receiving or both
Figure V.1.9.1 Serial Interface Initialize Procedure
When transmitting data in clock-synchronized master mode, transmit data is written to the transmit data register
after the initial setting is performed following the flow above. However, the clock generated by the baud-rate
timer must be supplied to the serial interface (at least one underflow has had to have occurred in the baud-rate
timer) before this writing. Otherwise, 0xFF will be transmitted prior to the written data.
The maximum transfer rate of the serial interface is limited to 8 Mbps in clock-synchronized mode or 1 Mbps in
asynchronous mode. Do not set a transfer rate (baud rate) that exceeds the limit.
If the receive circuit is stopped during reception, set both transmission and reception to the disabled status.
When performing data transfer in the clock-synchronized mode, the division ratio of the reload data for the baud-
rate timer should be set so that the baud-rate is 1/4 of the system clock frequency or lower.
When the transmit-enable bit TXENx is set to 0 to disable transmit operations, the transmit data buffer (FIFO) is
cleared (initialized). Similarly, when the receive-enable bit RXENx is set to 0 to disable receive operations, the
receive data buffer (FIFO) is cleared (initialized). Therefore, make sure that the buffer does not contain any data
waiting for transmission or reading before writing 0 to these bits.
During IrDA receive operations, the RZI circuit recognizes low pulses by means of the signal edge (rising edge
when IRRLx = 0; falling edge when IRRLx = 1). Note that noise may cause a malfunction.
iRRLx: Serial I/F Ch.x IrDA I/F Input Logic Inversion Bit in the Serial I/F Ch.x IrDA Register (D2/0x300Bx4)