
V PERIPHERAL MODULES 3 (INTERFACE): GENERAL-PURPOSE SERIAL INTERFACE (EFSIO)
S1C33E07 TECHNICAL MANUAL
EPSON
V-1-15
V
EFSIO
(3) Overrun error
Even when the receive data buffer is full (4 data have been received), the next (5th) data can be received into
the shift register. If there is no space in the buffer (data has not been read) when the 5th data has been received,
the 5th data in the shift register cannot be transferred to the buffer. If one more (6th) data is transferred to this
serial interface, the shift register (5th data) is overwritten with the 6th data and an overrun error is generated.
When an overrun error is generated, the overrun error flag OERx (D2/0x300Bx2) is set to 1. Once the overrun
error flag is set to 1, it remains set until it is reset by writing 0 to it in the software.
OERx: Serial I/F Ch.x Overrun Error Flag in the Serial I/F Ch.x Status Register (D2/0x300Bx2)
The overrun error is one of the receive-error interrupt causes in the serial interface. An interrupt can be gener-
ated for this error by setting the interrupt controller as necessary, so that the error can be processed by an inter-
rupt processing routine.
Generation of overrun error can be disabled by controlling the #SRDYx as shown below.
(4) Controlling the #SRDYx signal (advanced mode)
When the slave device is in receive mode, the #SRDYx signal is output from the slave device to the master de-
vice to notify whether the slave device is ready to receive data or not.
When this serial interface is in the clock-synchronized slave mode, the #SRDYx signal is turned to a low level
by writing 1 to RXENx (D6/0x300Bx3) to enable receive operations, thereby indicating to the master device
that the slave is ready to receive. When the LSB of data is received, #SRDYx is turned to a high level; when the
MSB is received, #SRDYx is returned to a low level, in preparation for the next receive operation.
If an overrun error occurs, #SRDYx is turned to a high level (unable to receive) at that point, so receive opera-
tions for the following data are suspended. In this case, #SRDYx is returned to low by reading out the receive
data buffer, and if any receive data follows, the slave restarts receiving data.
In the normal mode, the #SRDYx signal indicating ready to receive is output even if the receive data buffer is
full. If the receive data buffer cannot be read in this case, an overrun error occurs in the next data transfer. To
prevent this error, the serial interface provides #SRDYx high mask mode. In this mode, if the receive data buffer
is full, the #SRDYx signal is forcibly fixed at high in order to suspend data transfer from the master device until
the data in the buffer is read.
To use this function, set SRDYCTLx (D7/0x300Bx4) to 1.
SRDYCTLx: Serial I/F Ch.x #SRDY Control Bit in the Serial I/F Ch.x IrDA Register (D7/0x300Bx4)
This function is effective in the clock-synchronized master mode as well. In this case, the #SRDYx signal (low)
from the slave device is ignored when the receive data buffer is full and the serial interface stops outputting the
#SCLKx signal until the buffer data is read.
When the receive data buffer is not full, normal receive operation is performed even if this function is enabled.