19 UNIVERSAL SERIAL INTERFACE WITH LCD INTERFACE (USIL)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
19-27
Receive Errors
19.6
In UART mode, three different receive errors (overrun error, framing error, and parity error) may be detected while
receiving data. In SPI and I
2
C modes, overrun errors may be detected while receiving data.
Since receive errors are interrupt causes, they can be processed by generating interrupts. For more information on
interrupt control, see Section 19.7.
Overrun error (UART, SPI, I
2
C master/slave modes)
UART mode
An overrun error occurs if the next reception is completed when URDIF is 1 and the receive data buffer
(USIL_RD register) is not read (an overrun error occurs at the time stop bit has been received).
When an overrun error occurs, the overrun error flag (UOEIF/USIL_UIF register) is set to 1. The receiving
operation continues even if this error occurs. To reset UOEIF, perform USIL software reset (write 0x0 to
USILMOD[2:0]/USIL_GCFG register) to initialize USIL.
SPI mode
An overrun error occurs if data are received successively when SRDIF is 1. While SRDIF is set to 1, the
next received data will not be transferred from the shift register to the receive data buffer (the first byte data
exists in the receive data buffer and the second byte data exists in the shift register). An overrun error occurs
if the third byte data is received in this condition, as the second byte data in the shift register is corrupted (an
overrun error occurs at the time the first bit of the third byte is fetched).
When an overrun error occurs, the overrun error flag (SEIF/USIL_SIF register) is set to 1. The receiving
operation continues even if this error occurs. SEIF is reset by writing 1. To reset an overrun error, write 1 to
SEIF and then read the receive data buffer (USIL_RD register) twice. The procedure that writes 1 to SEIF
and reads USIL_RD register twice can be reversed.
I
2
C master/slave mode
An overrun error occurs when a transmit or receive trigger is issued after two-byte data has been received (the
first byte data exists in the receive data buffer and the second byte data exists in the shift register) without
the receive data buffer being read.
When an overrun error occurs, the overrun error flag (IMEIF/USIL_IMIF register for I
2
C master mode or
ISEIF/USIL_ISIF register for I
2
C slave mode) is set to 1. The receiving operation continues even if this er-
ror occurs. IMEIF/ISEIF is reset by writing 1. To reset an overrun error, write 1 to IMEIF/ISEIF and then
read the receive data buffer (USIL_RD register) twice.
Framing error (UART mode only)
If the stop bit is received as 0 in UART mode, the UART controller determines loss of sync and a framing error
occurs. If the stop bit is configured to two bits, only the first bit is checked.
The framing error flag (USEIF/USIL_UIF register) is set to 1 if this error occurs. The received data is still
transferred to the receive data buffer if this error occurs and the receiving operation continues, but the data can-
not be guaranteed, even if no framing error occurs for subsequent data receiving. The framing error flag is reset
to 0 by writing 1.
Parity error (UART mode only)
If UPREN/USIL_UCFG register has been set to 1 (parity enabled), data received is checked for parity in UART
mode. Data received in the shift register is checked for parity when sent to the receive data buffer. The matching
is checked against the UPMD/USIL_UCFG register setting (odd or even parity). If the result is a non-match, a
parity error is issued, and the parity error flag (UPEIF/USIL_UIF register) is set to 1. Even if this error occurs,
the data received is sent to the receive data buffer, and the receiving operation continues. However, the received
data cannot be guaranteed if a parity error occurs. The UPEIF flag is reset to 0 by writing 1.