Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сигнальный МП Motorola DSP56002.pdf
Скачиваний:
22
Добавлен:
26.05.2014
Размер:
2 Мб
Скачать
☆

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

HOST INTERFACE (HI)

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 processing 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 status 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.3Host 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

MOTOROLA PORT B 5 - 49

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc.

HOST INTERFACE (HI)

Freescale Semiconductor, Inc.

 

 

 

 

+5 V

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DSP56002

 

 

 

 

 

 

 

 

 

 

DR

HEN

F32

 

LDS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BR

 

 

 

 

FROM OPEN

 

 

 

 

 

HACK

 

 

 

AS

 

 

 

 

 

WT

 

F32

 

 

 

 

 

 

 

 

 

COLLECTOR

 

 

 

 

 

MODA/IRQA

 

ADDRESS

 

BUFFER

 

 

 

 

 

 

 

 

A4-A23

 

 

 

 

 

 

 

 

DECODE

 

 

 

 

 

 

 

MODC/NMI

 

 

 

 

 

 

 

 

 

 

 

MC68000

 

 

 

 

 

 

 

 

 

 

+5 V

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1K

(12.5MHz)

 

 

 

 

 

 

 

 

 

 

 

FROM

 

 

 

 

 

 

 

 

LS09

 

DTACK

 

 

 

 

 

 

 

 

 

 

 

RESET

 

 

 

 

 

RESET

 

 

 

FUNCTION

 

 

 

 

 

 

 

F32

 

 

 

 

 

 

 

MDB301*

 

HR/W

F32

R/W

 

 

 

 

 

 

 

 

H0-H7

8

 

D0-D7

 

 

 

 

 

 

 

 

 

 

FROM OPEN

 

 

 

 

 

 

HA0-HA2

3

 

A1-A3

 

 

 

 

 

 

 

 

COLLECTOR

 

 

 

 

 

MODB/IRQB

 

 

 

BUFFER

 

 

 

 

 

 

 

Notes: 1. *This diode must be a Schottky diode.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. All resistors are 15KΩ unless noted otherwise.

 

 

 

 

 

 

 

 

 

3. When in RESET, IRQA, IRQB and NMI must

 

 

 

 

 

 

 

 

 

be deasserted by external peripherals.

 

 

7

 

 

HOST

 

 

0

 

 

 

 

INIT

HM1

HM0

HF1

HF0

0

TREQ

INTERRUPT CONTROL REGISTER (ICR)

 

$0

RREQ

(READ/WRITE)

 

 

SETTING HF0 TERMINATES BOOTSTRAP LOADING AND STARTS

EXECUTION AT LOCATION P:$0000.

 

 

 

 

HOST ADDRESS

CONTENTS LOADED

 

 

 

 

WRITTEN

TO INTERNAL P: RAM AT:

 

 

 

 

 

4 (DUMMY)

 

 

 

 

 

5

P:$0000 HIGH BYTE

 

 

 

 

6

P:$0000 MID BYTE

 

 

 

 

7

P:$0000 LOW BYTE

 

 

 

 

 

•

•

 

 

 

 

 

•

•

 

 

 

 

 

•

•

SET HF0 FOR EARLY TERMINATION

 

 

 

 

 

 

 

 

 

 

4 (DUMMY)

•

 

 

 

 

5

P:$01FF HIGH BYTE

 

 

 

 

6

P:$01FF MID BYTE

 

 

 

 

7

P:$01FF LOW BYTE

 

 

 

 

 

 

 

• Because the DSP56002 is so fast, host handshaking is generally not required.

Figure 5-29 Bootstrap Using the HI

5 - 50 PORT B MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

HOST INTERFACE (HI)

the bits are set at 101 respectively, the DSP will load from the HI. Data is written by the host processor in a pattern of four bytes, with the high byte being a dummy and the low byte being the low byte of the DSP word (see Figure 5-29 and Figure 5-30). Figure 5-30 shows how an 8-,16-, 24-, or 32-bit word in the host processor maps into the HI registers. The HI register at address $4 is not used and will read as zero. It is not necessary to use address $4, but since many host processors are 16or 32-bit processors, address $4 will often be used as part of the 16or 32-bit word. The low order byte (at $7) should always be written last since writing to it causes the HI to initiate the transfer of the word to the HRX. Data is then transferred from the HRX to the DSP program memory. If the host processor needs to terminate the bootstrap loading before 512 words have been down loaded, it can set the HF0 bit in the ICR. The DSP will then terminate the down load and start executing at location P:$0000. Since the DSP56002 is typically faster than the host processor, hand shaking during the data transfer is normally not required.

The actual code used in the bootstrap program is given in APPENDIX A. The portion of the code that loads from the HI is shown in Figure 5-31. The BSET instruction configures

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRANSMIT/RECEIVE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BYTE REGISTERS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST BYTE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

 

 

 

 

 

0

 

 

 

 

 

ADDRESS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 0 0 0 0 0 0 0

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXH/RXH

 

 

 

 

 

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HIGH BYTE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXM/RXM

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MIDDLE BYTE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ACCESS TO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

 

 

 

 

LOW BYTE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TXL/RXL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LOW BYTE

 

 

 

 

 

 

 

 

 

 

 

INITIATES

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TRANSFER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

 

 

24 23

 

16 15

 

 

8

7

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST

 

 

 

 

READ - 00000000

 

 

HIGH

 

 

MIDDLE

 

 

 

 

 

 

 

LOW

 

 

 

 

 

 

 

 

 

 

 

 

 

DATA

 

 

 

 

WRITE - XXXXXXXX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8-BIT TRANSFER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-BIT TRANSFER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

24-BIT TRANSFER

32-BIT TRANSFER, LS 24 BITS ARE SIGNIFICANT

NOTE: Access low byte last

Figure 5-30 Transmit/Receive Byte Registers

MOTOROLA PORT B 5 - 51

For More Information On This Product, Go to: www.freescale.com

Соседние файлы в предмете Радиоприемные устройства