HOST INTERFACE (HI)
MOTOROLA
PORT B
5 - 49
interrupt vector (IV) location divided by two - i.e. if HV=$12, IV=$24).
2. The HC is then set.
3. The HCP bit in the HSR is set when HC is set.
4. If the HCIE bit in the HCR has been set by the DSP, the HC exception pro-
cessing will start. The HV is multiplied by 2 and the result is used by the DSP
as the interrupt vector.
5. When the HC exception is acknowledged, the HC bit (and therefore the HCP
bit) is cleared by the HC logic. HC can be read by the host processor as a sta-
tus bit to determine when the command is accepted. Similarly, the HCP bit can
be read by the DSP CPU to determine if an HC is pending.
To guarantee a stable interrupt vector, write HV only when HC is clear. The HC bit and
HV can be written simultaneously. The host processor can clear the HC bit to cancel a
host command at any time before the DSP exception is accepted. Although the HV can
be programmed to any exception vector, it is not recommended that HV=0 (RESET) be
used because it does not reset the DSP hardware. DMA must be disabled to use the host
exception.
5.3.6.2.3
Host to DSP - Bootstrap Loading Using the HI
The circuit shown in Figure 5-29 will cause the DSP to boot through the HI on power up.
During the bootstrap program, the DSP looks at the MODC, MODB, and MODA bits. If
;****************************************
; MAIN PROGRAM... receive data from host
;****************************************
ORG
P:$40
MOVE
#0,R0
MOVE
#3,M0
MOVEP
#1,X:PBC
;Turn on Host Port
MOVEP
#0,X:HCR
;Turn off XMT and RCV interrupts
MOVEP
#$0C00,X:IPR
;Turn on host interrupt
MOVE
#0,SR
;Unmask interrupts
JCLR
#3,X:HSR,*
;Wait for HF0 (from host) set to 1
MOVEP
#$1,X:HGR
;Enable host receive interrupt
JMP
*
;Now wait for interrupt
Figure 5-25 Receive Data from Host–Main Program
;************************************
; Receive from Host Interrupt Routine
;************************************
RCV
MOVEP
X:HRX,X:(R0)+
;Receive data.
RTI
END
Figure 5-26 Receive Data from Host Interrupt Routine
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
.
..