![Epson S1C17F13 Technical Manual Download Page 99](http://html.mh-extra.com/html/epson/s1c17f13/s1c17f13_technical-manual_107784099.webp)
10 UART (UART)
10-8
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
•
When the receive data buffer has a one-byte free space
The interrupt flag will be set when the first data byte already loaded is read out after the data
that encountered an error is transferred to the second byte entry of the receive data buffer.
Parity Error
10.6.2
If the parity function is enabled, a parity check is performed when data is received. The UART checks matching
between the data received in the shift register and its parity bit, and issues a parity error if the result is a non-match.
The received data that encountered an error is still transferred to the receive data buffer and the UA
n
INTF.PEIF
bit (parity error interrupt flag) is set to 1 when the data becomes ready to read from the UA
n
RXD register (see the
Note on framing error).
Overrun Error
10.6.3
If the receive data buffer is still full (two bytes of received data have not been read) when a data reception to the
shift register has completed, an overrun error occurs as the data cannot be transferred to the receive data buffer.
When an overrun error occurs, the UA
n
INTF.OEIF bit (overrun error interrupt flag) is set to 1.
Interrupts
10.7
The UART has a function to generate the interrupts shown in Table 10.7.1.
7.1 UART Interrupt Function
Table 10.
Interrupt
Interrupt flag
Set condition
Clear condition
End of transmission
UA
n
INTF.TENDIF When the UA
n
INTF.TBEIF bit = 1 after
the stop bit has been sent
Writing 1 or software reset
Framing error
UA
n
INTF.FEIF
Refer to “Receive Errors.”
Writing 1, reading received
data that encountered an
error, or software reset
Parity error
UA
n
INTF.PEIF
Refer to “Receive Errors.”
Writing 1, reading received
data that encountered an
error, or software reset
Overrun error
UA
n
INTF.OEIF
Refer to “Receive Errors.”
Writing 1 or software reset
Receive buffer two bytes full UA
n
INTF.RB2FIF When the second received data byte is
loaded to the receive data buffer in which
the first byte is already received
Reading received data or
software reset
Receive buffer one byte full UA
n
INTF.RB1FIF When the first received data byte is load-
ed to the emptied receive data buffer
Reading data to empty
the receive data buffer or
software reset
Transmit buffer empty
UA
n
INTF.TBEIF When transmit data written to the trans-
mit data buffer is transferred to the shift
register
Writing transmit data
The UART provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the
interrupt controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is
set. For more information on interrupt control, refer to the “Interrupt Controller” chapter.
Control Registers
10.8
uaRT Ch.
n
Clock Control Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
UA
n
CLK
15–9 –
0x00
–
R
–
8
DBRUN
0
H0
R/W
7–6 –
0x0
–
R
5–4 CLKDIV[1:0]
0x0
H0
R/W
3–2 –
0x0
–
R
1–0 CLKSRC[1:0]
0x0
H0
R/W