Motorola DSP56367 User Manual page 379

24-bit digital signal processor
Table of Contents

Advertisement

move #PROMADDR,r1
bra
<FINISH
;========================================================================
; This is the routine that loads from SHI.
; MD:MC:MB:MA=0100 - reserved for SHI
; MD:MC:MB:MA=0101 - Bootstrap from SHI (SPI slave)
; MD:MC:MB:MA=0110 - Bootstrap from SHI (I2C slave, HCKFR=1,100ns filter)
; MD:MC:MB:MA=0111 - Bootstrap from SHI (I2C slave, HCKFR=0)
SHILD
; This is the routine which loads a program through the SHI port.
; The SHI operates in the slave
; mode, with the 10-word FIFO enabled, and with the HREQ pin enabled for
; receive operation. The word size for transfer is 24 bits. The SHI
; operates in the SPI or in the I2C mode, according to the bootstrap mode.
;
; The program is downloaded according to the following rules:
; 1) 3 bytes - Define the program length.
; 2) 3 bytes - Define the address to which to start loading the program to.
; 3) 3n bytes (while n is the program length defined by the first 3 bytes)
; The program words will be stored in contiguous PRAM memory locations starting
; at the specified starting address.
; After storing the program words, program execution starts from the same
; address where loading started.
move
; HEN=1, HI2C=0, HM1-HM0=10, HCKFR=0, HFIFO=1, HMST=0,
; HRQE1-HRQE0=01, HIDLE=0, HBIE=0, HTIE=0, HRIE1-HRIE0=00
jclr
jclr
bset
shi_loop
movep
jclr
movep
jclr
movep
move
do
jclr
movep
nop
_LOOP2
MOTOROLA
; store starting PROM address in r1
#$A9,r1
; prepare SHI control value in r1
#MA,omr,SHI_CF
; If MD:MC:MB:MA=01x0, go to SHI clock freeze
#MB,omr,shi_loop
#HI2C,r1
r1,x:M_HCSR
#HRNE,x:M_HCSR,*
x:M_HRX,a0
#HRNE,x:M_HCSR,*
x:M_HRX,r0
r0,r1
a0,_LOOP2
#HRNE,x:M_HCSR,*
x:M_HRX,p:(r0)+
DSP56367
Bootstrap ROM Contents
; If MD:MC:MB:MA=0101, select SPI mode
; otherwise select I2C mode.
; enable SHI
; wait for no. of words
; wait for starting address
; wait for HRX not empty
; store in Program RAM
; req. because of restriction
A-5

Advertisement

Table of Contents
loading

Table of Contents