HOST INTERFACE (HI)
MOTOROLA
PORT B
5 - 43
7.
When the DSP reads the HRX, the HRDF bit is automatically cleared and
TXDE in the ISR is set.
8.
When TXDE=0 and HRDF=0, data is automatically transferred from TBR to
HRX which sets HRDF.
9.
The DSP can poll HRDF to see when data has arrived, or it can use interrupts.
10.
If HRIE (in the HCR) and HRDF are set, exception processing is started using
interrupt vector P:$0020.
The code shown in Figure 5-25 is an excerpt from the Host I/O Port Technical Bulletin (in-
house document). The MAIN PROGRAM initializes the HI and then hangs in a wait loop
while it allows interrupts to transfer data from the host processor to the DSP. The first
three MOVEP instructions enable the HI and configure the interrupts. The following
MOVE enables the interrupts (this should always be done after the interrupt programs and
hardware are completely initialized) and prepares the DSP CPU to look for the host flag,
HF0=1. The JCLR instruction is a polling loop that looks for HF0=1, which indicates that
the host processor is ready. When the host processor is ready to transfer data to the DSP,
the DSP enables HRIE in the HCR, which allows the interrupt routine to receive data from
the host processor. The jump-to-self instruction that follows is for test purposes only, it can
be replaced by any other code in normal operation.
16-BIT DMA
BIT 5 = 0
BIT 6 = 1
INIT
HM1
HM0
HF1
HF0
TREQ RREQ
$0
*Reserved; write as zero.
7
6
5
4
3
2
1
0
INITIALIZE DSP
INITIALIZE HI**
BIT 7 = 1
OPTIONAL
INTERRUPT CONTROL REGISTER (ICR)
(READ/WRITE)
DMA OFF
BIT 5 = 1
BIT 6 = 1
STEP 2 OF HOST PORT CONFIGURATION
2. OPTION 5: SELECT DMA MODE FOR
ENABLE
RECEIVE DATA FULL INTERRUPT
BIT 0 = 1
BIT 1 = 0
ENABLE
TRANSMIT DATA EMPTY INTERRUPT
BIT 0 = 0
BIT 1 = 1
DSP TO HOST
OR
HOST TO DSP
24-BIT DMA
BIT 5 = 1
BIT 6 = 0
*
OR
OR
Figure 5-21 (d) HI Initialization–Host Side, DMA Mode
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
.
..
Содержание DSP56002
Страница 380: ......
Страница 382: ......
Страница 390: ...Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc...