SERIAL COMMUNICATION INTERFACE (SCI)
MOTOROLA
PORT C
6 - 71
;For 1 ms, SCP=0,
;CD=0001 0011 1111.
MOVEP
#$C000,X:IPR
;Set the interrupt priority level–
;application specific.
ANDI
#$FC,MR
;Enable interrupts, set MR bits I1 and
;I0=0
END
JMP
END
;Normally something more useful
;would be put here.
END
;End of example.
Figure 6-36 SCI Timer Example (Sheet 2 of 2)
6.3.10
Bootstrap Loading Through the SCI (Operating Mode 6)
When the DSP comes out of reset, it looks at the MODC, MODB, and MODA pins and
sets the corresponding mode bits in the OMR. If the mode bits are set to 110 respec-
tively, the DSP will load the program RAM from the SCI. Figure 6-37 shows how the SCI
is configured for receiving this code and Figure 6-37 shows the segment of bootstrap
code that is used to load from the SCI. The complete code used in the bootstrap program
is given in APPENDIX A. This program (1) configures the SCI, (2) loads the program
size, (3) loads the location where the program will begin loading in program memory, and
(4) loads the program.
First, the SCI Control Register is set to $0302 (see Figure 5-2) which enables the trans-
mitter and receiver and configures the SCI for 10 bits asynchronous with one start bit,
8 data bits, one stop bit, and no parity. Next, the SCI Clock Control Register is set to
$C000 which configures the SCI to use external receive and transmit clocks on the SCLK
pin. This clock must be 16 times the serial data rate.
The next step is to receive the program size and then the starting address to load the
program. These two numbers are three bytes each loaded least significant byte first.
Each byte will be echoed back as it is received. After both numbers are loaded, the pro-
gram size is in A0 and the starting address is in A1.
The program is then loaded one byte at a time, least significant byte first. After loading
the program, the operating mode is set to zero, the CCR is cleared, and the DSP begins
execution with the first instruction that was loaded.
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
.
..