Operations; Initialization - Epson S1C31D50 Technical Manual

Cmos 32-bit single chip
Hide thumbs Also See for S1C31D50:
Table of Contents

Advertisement

13 UART (UART3)
UART3_nMOD register
CHLN bit
STPB bit
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1

13.5 Operations

13.5.1 Initialization

The UART3 Ch.n should be initialized with the procedure shown below.
1. Assign the UART3 Ch.n input/output function to the ports. (Refer to the "I/O Ports" chapter.)
2. Set the UART3_nCLK.CLKSRC[1:0] and UART3_nCLK.CLKDIV[1:0] bits. (Configure operating clock)
3. Configure the following UART3_nMOD register bits:
- UART3_nMOD.BRDIV bit
- UART3_nMOD.INVRX bit
- UART3_nMOD.INVTX bit
- UART3_nMOD.PUEN bit
- UART3_nMOD.OUTMD bit
- UART3_nMOD.IRMD bit
- UART3_nMOD.CHLN bit
- UART3_nMOD.PREN bit
- UART3_nMOD.PRMD bit
- UART3_nMOD.STPB bit
- UART3_nMOD.CAREN bit
- UART3_nMOD.PECAR bit
4. Set the UART3_nBR.BRT[7:0] and UART3_nBR.FMD[3:0] bits.
5. Set the UART3_nCAWF.CRPER[7:0] bits.
6. Set the following UART3_nCTL register bits:
- Set the UART3_nCTL.SFTRST bit to 1.
- Set the UART3_nCTL.MODEN bit to 1.
7. Set the following bits when using the interrupt:
- Write 1 to the interrupt flags in the UART3_nINTF register.
- Set the interrupt enable bits in the UART3_nINTE register to 1. * (Enable interrupts)
* The initial value of the UART3_nINTF.TBEIF bit is 1, therefore, an interrupt will occur immediately after
the UART3_nINTE.TBEIE bit is set to 1.
8. Configure the DMA controller and set the following UART3 control bits when using DMA transfer:
- Write 1 to the DMA transfer request enable bits in the
UART3_nTBEDMAEN and UART3_nRB1FDMAEN registers. (Enable DMA transfer requests)
13-4
PREN bit
0
st
D0
1
st
D0
0
st
D0
1
st
D0
0
st
D0
1
st
D0
0
st
D0
1
st
D0
Figure 13.4.1 Data Format
(Select baud rate division ratio (1/16 or 1/4))
(Enable/disable USINn input signal inversion)
(Enable/disable USOUTn output signal inversion)
(Enable/disable USINn pin pull-up)
(Enable/disable USOUTn pin open-drain output)
(Enable/disable IrDA interface)
(Set data length (7 or 8 bits))
(Enable/disable parity function)
(Select parity mode (even or odd))
(Set stop bit length (1 or 2 bits))
(Enable/disable carrier modulation function)
(Select carrier modulation period (H data period/L data period))
Seiko Epson Corporation
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
D1
D2
D3
D4
D5
st: start bit, sp: stop bit, p: parity bit
(Set transfer rate)
(Set carrier cycle)
(Execute software reset)
(Enable UART3 Ch.n operations)
(Clear interrupt flags)
S1C31D50/D51 TECHNICAL MANUAL
D6
sp
D6
p
sp
D6
sp
sp
D6
p
sp
sp
D6
D7
sp
D6
D7
p
sp
D6
D7
sp
sp
D6
D7
p
sp
sp
(Rev. 2.00)

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c31d51

Table of Contents