13 UART (UART3)
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
13-7
(Rev. 2.00)
USINn
UART3_nINTF.RB1FIF
UART3_nINTF.RB2FIF
UART3_nINTF.RBSY
Software operations
st D0
···
p sp st D0
···
p sp st D0
···
p sp st D0
···
p sp
(st: start bit, sp: stop bit, p: parity bit)
data 1
data 2
data 3
data 4
UART3_nRXD
→
data 1 (R)
UART3_nRXD
→
data 3 (R)
UART3_nRXD
→
data 2 (R)
Figure 13.5.3.1 Example of Data Receiving Operations
Data reception (1 byte read)
End
Wait for an interrupt request
(UART3_nINTF.RB1FIF = 1)
Read receive data (1 byte) from
the UART3_nRXD register
NO
YES
Receive data remained?
Data reception (2 bytes read)
End
Wait for an interrupt request
(UART3_nINTF.RB2FIF = 1)
Read receive data (1 byte) from
the UART3_nRXD register
Read receive data (1 byte) from
the UART3_nRXD register
NO
YES
Receive data remained?
Figure 13.5.3.2 Data Reception Flowcharts
Data reception using DMA
By setting the UART3_
n
RB1FDMAEN.RB1FDMAEN
x
bit to 1 (DMA transfer request enabled), a DMA
transfer request is sent to the DMA controller and the received data is transferred from the UART3_
n
RXD reg-
ister to the specified memory via DMA Ch.
x
when the UART3_
n
INTF.RB1FIF bit is set to 1 (receive buffer
one byte full).
This automates the procedure (read by one byte) described above.
The transfer source/destination and control data must be set for the DMA controller and the relevant DMA
channel must be enabled to start a DMA transfer in advance. For more information on DMA, refer to the “DMA
Controller” chapter.
Table 13.5.3.1 DMA Data Structure Configuration Example (for Data Reception)
Item
Setting example
End pointer Transfer source
UART3_nRXD register address
Transfer destination Memory address to which the last received data is stored
Control data dst_inc
0x0 (+1)
dst_size
0x0 (byte)
src_inc
0x3 (no increment)
src_size
0x0 (byte)
R_power
0x0 (arbitrated for every transfer)
n_minus_1
Number of transfer data
cycle_ctrl
0x1 (basic transfer)
13.5.4 IrDA Interface
This UART3 includes an RZI modulator/demodulator circuit enabling implementation of IrDA 1.0-compatible in-
frared communication function simply by adding simple external circuits.
Set the UART3_
n
MOD.IRMD bit to 1 to use the IrDA interface.
Data transfer control is identical to that for normal interface even if the IrDA interface function is enabled.