Chapter 13
Serial Interface
XIII - 54 Full-duplex UART Communication
13.4.4 Setting procedure
The setting procedure of full-duplex UART is shown as follows.
Initial Setting Before Communication
Setting Page
Initial Setting Before Communication XIII-54
Data Transmission XIII-55
Data Reception XIII-55
UART Break Transmission XIII-55
Step Setting Register name Description
1
Disable interrupt SCnTICR.SCnTIE = 0
SCnRICR.SCnRIE = 0
Disable the interrupt for SCIFn to be used.
2
Serial reset SCnMD3.SCnRSTN = 0
SCnMD3.SCnRSRN = 0
Execute serial reset.
3
Pin setting 1
(Disable communication pins)
- Set pins to general-purpose ports to disable communication
pins.
Refer to the chapter, "IO Port" for setting general-purpose
ports.
4
BRTMn setting BRTM_S_MD
BRTM_S_CKSEL
BRTM_S01_CK
BRTM_S23_CK
BRTM_Sn_OC
While BRTMn is active, set BRTM_S_EN.BRTM_Sn_EN to
0 to stop counting.
Output clock cycle and duty for BRTMn are set.
5
Mode register setting SCnMD0
SCnMD1
SCnMD2
SCnMD3
Set SCIFn operation mode.
6
Pin setting 2 SCnMD1.SCnSBOS
SCnMD1.SCnSBIS
Set pins used for serial communication to 1.
7
Pin setting 3
(Enable communication pins)
- Enable communication pins.
8
Clear interrupt source SCnTICR.SCnTIR
SCnRICR.SCnRIR
Clear the interrupt source.
9
Enable interrupt SCnTICR.SCnTIE
SCnTICR.SCnTIE
Enable the interrupt to be used.
10
BRTMm counting start BRTM_S_EN.BRTM_Sn_
EN = 1
BRTM starts counting.
11
Release serial reset SCnMD3.SCnRSTN = 1
SCnMD3.SCnRSRN = 1
Release the serial reset.
After that, serial communication is enabled.