
System Overview
DSP Subsystem Code
MOTOROLA
SHI Port Usage
2-7
Example 2-1
SHI Boot in SPI Mode Section of Bootstrap ROM Program
; This is the routine that loads from the Serial Host Interface.
; MC:MB:MA=101 - Bootstrap from SHI (SPI)
; MC:MB:MA=111 - Bootstrap from SHI (IIC)
; If MC:MB:MA=1x1, the internal program RAM is loaded with 512 words received
; through the Serial Host Interface (SHI). 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 IIC mode, according to the bootstrap
; mode. The OnCE is enabled by the bootstrap code.
shild jclr #ma,omr,ma_0
shild_1 movep a,x:ogdbr ; enable the OnCE
move #$0002A9,x1 ; SHI control word (SPI)
; HEN=1, HI2C=0, HM1-HM0=10, HFIFO=1, HMST=0,
; HRQE1-HRQE0=01, HIDLE=1, HBIE=0, HTIE=0, HRIE1-HRIE0=00
move #<0,r0 ; start loading code at P:$0
jmp <$100
org pl:$100,pl:$100 ; Start of second 32-word group
jclr #mb,omr,shi_loop ; If MC:MB:MA=101, then SPI
bset #hi2c,x1 ; IIC (HI2C=1)
shi_loop movep x1,x:hcsr ; enable SHI
do #512,_loop2
jclr #hrne,x:hcsr,* ; wait for HRX not empty
movep x:hrx,p:(r0)+ ; store in Program RAM
_loop2
jmp <exit ; Finish
ma_0 jmp <shild_1 ; make MC:MB:MA=1x0 equal to MC:MB:MA=1x1
; This code fills the unused bootstrap rom locations with their address
dup $120-*
dc *
endm
Komentarze do niniejszej Instrukcji