Sci Initialization; Sci Initialization Example - Motorola DSP56305 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

8.4.2

SCI Initialization

The correct way to initialize the SCI is as follows:
1. Hardware or software reset
2. Program SCI control registers
3. Configure at least one SCI signal as SCI, not GPIO
If interrupts are used, the signals must be selected and interrupts must be enabled and
unmasked before the SCI can operate. Any one of these three requirements for interrupts
may be used to enable the SCI, the order does not matter.
A synchronous application usually requires an exact frequency, so the crystal frequency
must be chosen carefully. An alternative to selecting the system clock to accommodate
SCI requirements is to provide an external clock to the SCI.
8.4.3

SCI Initialization Example

One way to initialize the SCI is described below (as an example).
1. Let the SCI be in SCI individual reset state (PCR = $0).
2. Configure the control registers (SCR, SCCR) according to the operating mode, but
do not enable either transmitter (TE = 0) or receiver (RE = 0).
It is possible to set the interrupt enable bits used during the operation (no
interrupt occurs).
3. Enable the SCI by setting the PCR bits according to signals used during operation.
4. If the transmit interrupt is not used, write data to the transmitter.
If the transmitter interrupt enable is set, an interrupt is issued and the interrupt
handler should write data into the transmitter.
The SCI transmit request is serviced by a DMA channel if it is programmed to
service the SCI transmitter.
5. Enable the transmitters (TE = 1) and receiver (RE = 1), according to usage.
MOTOROLA
DSP56305 User's Manual
Serial Communication Interface (SCI)
Operating Modes
8-27

Advertisement

Table of Contents
loading

Table of Contents