Sci Initialization - Freescale Semiconductor DSP56311 User Manual

24-bit digital signal processor (dsp)
Hide thumbs Also See for DSP56311:
Table of Contents

Advertisement

Serial Communication Interface (SCI)

8.4 SCI Initialization

The SCI is initialized as follows:
1.
Ensure that the SCI is in its individual reset state (PCRE = $0). Use a hardware
signal or software RESET instruction.
2.
Program the SCI control registers.
Configure at least one SCI signal as an SCI signal.
3.
If interrupts are to be used, the signals must be selected, and global interrupts must be enabled
and unmasked before the SCI can operate. The order does not matter; any one of these three
requirements for interrupts can enable the SCI, but the interrupts should be unmasked last (that is,
I[1–0] bits in the Status Register (SR) should be changed last). Synchronous applications usually
require exact frequencies, so the crystal frequency must be chosen carefully. An alternative to
selecting the system clock to accommodate the SCI requirements is to provide an external clock
to the SCI. When the SCI is configured in Synchronous mode, internal clock, and all the SCI pins
are simultaneously enabled, an extra pulse of one DSP clock length is provided on the
There are two workarounds for this issue:
Enable an SCI pin other than
In the next instruction, enable the remaining SCI pins, including the
Following is an example of one way to initialize the SCI:
Ensure that the SCI is in its individual reset state (PCRE = $0).
1.
Configure the control registers (SCR, SCCR) according to the operating mode, but do
2.
not enable transmitter (TE = 0) or receiver (RE = 0).
Note:
It is now possible to set the interrupts enable bits that are used during the operation. No
interrupt occurs yet.
3.
Enable the SCI by setting the PCRE bits according to which signals are used during
operation.
If transmit interrupt is not used, write data to the transmitter.
4.
Note:
If transmitter interrupt enable is set, an interrupt is issued and the interrupt handler
should write data into the transmitter. The DMA channel services the SCI transmit
request if it is programmed to service the SCI transmitter.
5.
Enable transmitters (TE = 1) and receiver (RE = 1) according to use.
8-6
.
SCLK
DSP56311 User's Manual, Rev. 2
RESET
pin.
SCLK
pin.
SCLK
Freescale Semiconductor

Advertisement

Table of Contents
loading

Table of Contents