Motorola DSP56301 User Manual
Page 311
DSP56301 User’s Manual
A
-15
bset #M_BAAP,x:M_AAR1 ; change AA1 polarity, in order to set
; it high
; (5) ACTIVATE SERIAL INTERFACE and SYNCHRONIZE
movep #3,x:M_STXL ; load TX byte (READ opcode, B0)
bset #M_SCTE,x:M_SCR ; activate SCI’s TX
; (6) TRANSMIT OPCODE and ADDRESS
jclr #M_TDRE,x:M_SSR,* ; wait until byte is TXed (opcode, B0)
movep #0,x:M_STXL ; load TX byte (address, B1)
jclr #M_RDRF,x:M_SSR,* ; wait until byte is RXed (garbage, B2-)
movep x:M_SRXL,a2 ; read garbage
jclr #M_TDRE,x:M_SSR,* ; wait until byte is TXed (address, B1)
movep a2,x:M_STXL ; keep transmitting to maitain clock (ECHO)
jclr #M_RDRF,x:M_SSR,* ; wait until byte is RXed (garbage, B1-)
movep x:M_SRXL,a2 ; read garbage
; first read two words: program_length and target_address
do #6,_rd_2_ws
jclr #M_TDRE,x:M_SSR,* ; wait until byte is TXed (ECHO)
movep a2,x:M_STXL ; keep transmitting to maitain clock (ECHO)
jclr #M_RDRF,x:M_SSR,* ; wait until byte is RXed (valid, B0.)
movep x:M_SRXL,a2 ; read ONE byte (valid, B0...)
asr #8,a,a ; pack it
_rd_2_ws
move a1,r0 ; starting address for load
move a1,r1 ; save starting address
; Now read program words
do a0,_rd_n_ws ; read N words
do #3,_rd_bytes ; read 3 bytes
jclr #M_TDRE,x:M_SSR,* ; wait until byte is TXed (ECHO)
movep a2,x:M_STXL ; keep transmitting to maintain clock (ECHO)
; (7) READ ONE BYTE
jclr #M_RDRF,x:M_SSR,* ; wait until byte is RXed (valid, B6...)
movep x:M_SRXL,a2 ; read ONE byte (valid, B6...)
; (8) PACK IT
asr #8,a,a ; pack it
_rd_bytes
; (10) WRITE TO DESTINATION
move a1,p:(r0)+
; Store 24-bit result in P mem
nop ; pipeline delay
nop ; pipeline delay
_rd_n_ws
; (13) DEASSERT CHIP SELECT
bclr #M_BAAP,x:M_AAR1 ; change AA1 polarity, in order to set
; it high
bra ; Boot from EPROM done