SERIAL COMMUNICATION INTERFACE (SCI)
MOTOROLA
PORT C
6 - 31
6.3.3
Register Contents After Reset
There are four methods to reset the SCI. Hardware or software reset clears the port con-
trol register bits, which configure all I/O as general-purpose input. The SCI will remain in
the reset state while all SCI pins are programmed as general-purpose I/O (CC2, CC1, and
CC0=0); the SCI will become active only when at least one of the SCI I/O pins is pro-
grammed as not general-purpose I/O.
During program execution, the CC2, CC1, and CC0 bits may be cleared (individual re-
set), which will cause the SCI to stop serial activity and enter the reset state. All SCI
status bits will be set to their reset state; however, the contents of the interface control
register are not affected, allowing the DSP program to reset the SCI separately from the
other internal peripherals.
The STOP instruction halts operation of the SCI until the DSP is restarted, causing the
SSR to be reset. No other SCI registers are affected by the STOP instruction. Table 6-2
illustrates how each type of reset affects each register in the SCI.
6.3.4
SCI Initialization
The correct way to initialize the SCI is as follows:
1. Hardware or software reset
2. Program SCI control registers
3. Configure SCI pins (at least one) as not general-purpose I/O
Figure 6-14 and Figure 6-15 show how to configure the bits in the SCI registers. Figure
6-14 is the basic initialization procedure showing which registers must be configured. (1)
A hardware or software reset should be used to reset the SCI and prevent it from doing
anything unexpected while it is being programmed. (2) Both the SCI interface control reg-
ister and the clock control register must be configured for any operation using the SCI. (3)
The pins to be used must then be selected to release the SCI from reset and (4) begin
operation. If interrupts are to be used, the pins must be selected, and interrupts must be
enabled and unmasked before the SCI will operate. The order does not matter; any one
of these three requirements for interrupts can be used to finally enable the SCI.
Figure 6-15 shows the meaning of the individual bits in the SCR and SCCR. The figures
below do not assume that interrupts will be used; they recommend selecting the appropri-
ate pins to enable the SCI. Programs shown in Figures Figure 6-20, Figure 6-21, Figure
6-28, Figure 6-34, and Figure 6-36 control the SCI by enabling and disabling interrupts.
Either method is acceptable.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..