11 UART (UART3)
11-8
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
Transmit data
CAREN = 0
CAREN = 1
PECAR = 0
CAREN = 1
PECAR = 1
CAREN = 0
CAREN = 1
PECAR = 0
CAREN = 1
PECAR = 1
Start
bit
1
1
1
0
0
1
0
0
Parity
bit
Stop
bit
USOUTn
(INVTX = 0)
USOUTn
(INVTX = 1)
Figure 11.5.5.1 Carrier Modulation Waveform (UAnMOD.CHLN = 1, UAnMOD.STPB = 0, UAnMOD.PREN = 1
)
The carrier modulation output frequency is determined by the UA
n
CAWF.CRPER[7:0] bit settings. Use the follow-
ing equations to calculate the setting values for obtaining the desired frequency.
CLK_UART3
Carrier modulation output frequency = ——————————— [Hz]
(Eq. 11.2)
(CRPER + 1)
×
2
Where
CLK_UART3: UART3 operating clock frequency [Hz]
CRPER: UA
n
CAWF.CRPER[7:0] setting value (0 to 255)
11.6 Receive Errors
Three different receive errors, framing error, parity error, and overrun error, may be detected while receiving data.
Since receive errors are interrupt causes, they can be processed by generating interrupts.
11.6.1 Framing Error
The UART3 determines loss of sync if a stop bit is not detected (when the stop bit is received as 0) and assumes
that a framing error has occurred. The received data that encountered an error is still transferred to the receive data
buffer and the UA
n
INTF.FEIF bit (framing error interrupt flag) is set to 1 when the data becomes ready to read
from the UA
n
RXD register.
Note: Framing error/parity error interrupt flag set timings
These interrupt flags will be set after the data that encountered an error is transferred to the re-
ceive data buffer. Note, however, that the set timing depends on the buffer status at that point.
• When the receive data buffer is empty
The interrupt flag will be set when the data that encountered an error is transferred to the re-
ceive data buffer.
• 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.
11.6.2 Parity Error
If the parity function is enabled, a parity check is performed when data is received. The UART3 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).