Freescale Semiconductor DSP56366 User Manual
Page 261

DSP56366 Bootstrap Program
DSP56366 24-Bit Digital Signal Processor User Manual, Rev. 4
Freescale Semiconductor
A-9
; HROD = 0 Host request is active when enabled
; spare = 0 This bit should be set to 0 for
; future compatability
; HEN = 0 When the HPCR register is modified
; HEN should be cleared
; HAEN = 0 Host acknowledge is disabled
; HREN = 1 Host requests are enabled
; HCSEN = 1 Host chip select input enabled
; HA9EN = 1 Enable address 9 input
; HA8EN = 1 Enable address 8 input
; HGEN = 0 Host GPIO pins are disabled
HDI08CONT
bset #HEN,x:M_HPCR ; Enable the HDI08 to operate as host
; interface (set HEN=1)
jclr #HRDF,x:M_HSR,* ; wait for the program length to be
; written
movep x:M_HORX,a0
jclr #HRDF,x:M_HSR,* ; wait for the program starting address
; to be written
movep x:M_HORX,r0
move r0,r1
do a0,HDI08LOOP ; set a loop with the downloaded length
HDI08LL
jset #HRDF,x:M_HSR,HDI08NW ; If new word was loaded then jump to
; read that word
jclr #HF0,x:M_HSR,HDI08LL ; If HF0=0 then continue with the
; downloading
enddo ; Must terminate the do loop
bra HDI08NW movep x:M_HORX,p:(r0)+ ; Move the new word into its destination ; location in the program RAM nop ; pipeline delay HDI08LOOP ;======================================================================== ; This is the exit handler that returns execution to normal ; expanded mode and jumps to the RESET vector. FINISH andi #$0,ccr ; Clear CCR as if RESET to 0. jmp (r1) ; Then go to starting Prog addr.