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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

INTRODUCTION

A.1 INTRODUCTION

This section presents the Bootstrap program contained in the DSP56002 64-word Boot

ROM. This program can load the internal program RAM starting at P:$0 from an external EPROM or the Host Interface, and may load any program RAM segment from the SCI serial interface.

If MC:MB:MA=001, the program loads the internal program RAM from 1,536 consecutive byte-wide P memory locations, starting at P:$C000 (bits 7-0). These will be packed into 512 24-bit words and stored in contiguous program RAM memory locations starting at P:$0. After assembling one 24-bit word, the bootstrap program stores the result in internal program RAM memory. Note that the routine loads data starting with the least significant byte of P:$0.

If MC:MB:MA=10x, the program loads internal program RAM from the Host Interface, starting at P:$0. If only a portion of the P memory is to be loaded, the Host Interface bootstrap load program may be stopped by setting Host Flag 0 (HF0). This will terminate the bootstrap loading operation and start executing the loaded program at location P:$0 of the internal program RAM.

If MC:MB:MA=11x, the program loads program RAM from the SCI interface. The number of program words to be loaded and the starting address must be specified. The SCI bootstrap code expects to receive 3 bytes specifying the number of program words, 3 bytes specifying the address in internal program RAM to start loading the program words and then 3 bytes for each program word to be loaded. The number of words, the starting address and the program words are received least significant byte first followed by the mid and then by the most significant byte. After receiving the program words, program execution starts at the same address where loading started. The SCI is programmed to work in asynchronous mode with 8 data bits, 1 stop bit and no parity. The clock source is external and the clock frequency must be 16x the baud rate. After each byte is received, it is echoed back through the SCI transmitter.

The bootstrap program listing is shown in Figure A-1.

MOTOROLA BOOTSTRAP AND ROM CODE A - 3

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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

INTRODUCTION

;BOOTSTRAP CODE FOR DSP56002 - (C) Copyright 1990 Motorola Inc.

;Revised October 24, 1990.

;

; Bootstrap through the Host Interface, External EPROM or SCI.

;

 

 

 

;

 

 

 

BOOT

EQU

$C000

; this is the location in P memory

 

 

 

; on the external memory bus

 

 

 

; where the external byte-wide

 

 

 

; EPROM would be located

PBC

EQU

$FFE0

; Port B Control Register

HSR

EQU

$FFE9

; Host Status Register

HRX

EQU

$FFEB

; Host Receive Register

PCC

EQU

$FFE1

; Port C Control Register

SCR

EQU

$FFF0

; SCI Control Register

SSR

EQU

$FFF1

; SCI Status Register

SCCR

EQU

$FFF2

; SCI Clock Control Register

SRXL

EQU

$FFF4

; SCI Receive Register Low

STXL

EQU

$FFF4

; SCI Transmit Register Low

 

ORG

PL:$0,PL:$0

; bootstrap code starts at $0

START

MOVE

#<0,R0

; default P address where prog

 

 

 

; will begin loading

 

JCLR

#4,OMR,EPROMLD

; If MC:MB:MA=0xx, go load from EPROM

 

JSET

#1,OMR,SCILD

; If MC:MB:MA=11x, go load from SCI

;This routine loads from the Host Interface.

;MC:MB:MA=100 - reserved

;MC:MB:MA=101 - Host

HOSTLD

BSET

#0,X:PBC

; Configure Port B as Host

 

DO

#512,_LOOP3

; Load 512 instruction words

_LBLA

JCLR

#3,X:HSR,_LBLB

; if HF0=1, stop loading data.

 

ENDDO

 

; Must terminate the do loop

 

JMP

<_LOOP3

 

_LBLB

JCLR

#0,X:HSR,_LBLA

; Wait for HRDF to go high

 

 

 

; (meaning data is present).

 

MOVEP

X:HRX,P:(R0)+

; Store 24-bit data in P mem.

_LOOP3

 

 

; and go get another 24-bit word.

 

JMP

<FINISH

; finish bootstrap

Figure A-1 DSP56002 Bootstrap Program (Sheet 1 of 3)

A - 4 BOOTSTRAP AND ROM CODE MOTOROLA

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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

INTRODUCTION

;This routine loads from external EPROM.

;MC:MB:MA=001

EPROMLD

MOVE

#BOOT,R1

; R1 = Ext address of EPROM

 

DO

#512,_LOOP1

; Load 512 instruction words

 

DO

#3,_LOOP2

; Each instruction has 3 bytes

 

MOVEM

P:(R1)+,A2

; Get the 8 LSB from ext. P mem.

 

REP

#8

; Shift 8 bit data into A1

 

ASR

A

 

_LOOP2

 

 

; Get another byte.

 

MOVEM

A1,P:(R0)+

; Store 24-bit result in P mem.

_LOOP1

; and go get another 24-bit word.

 

FINISH

MOVE

#<0,R1

 

 

JMP

<BOOTEND

; finish bootstrap

;This routine loads from the SCI.

;MC:MB:MA=110 - external SCI clock

;MC:MB:MA=111 - reserved

 

SCILD

MOVEP

#$0302,X:SCR

; Configure SCI Control Reg

 

 

 

 

JMP

<EXTC

; go to next boot rom segment

 

 

 

 

NOP

 

; just to fill the last space

 

 

 

 

ORG

PL:$100,PL:$100

; starting address of 2nd 32-word bootstrap ROM

 

 

 

EXTC

MOVEP

#$C000,X:SCCR

; Configure SCI Clock Control Reg

 

 

 

 

MOVEP

#7,X:PCC

; Configure SCLK, TXD and RXD

 

 

 

_SCI1

DO

#6,_LOOP6

; get 3 bytes for number of

 

 

 

 

 

 

; program words and 3 bytes

 

 

 

 

 

 

; for the starting address

 

 

 

 

JCLR

#2,X:SSR,*

; Wait for RDRF to go high

 

 

 

 

MOVEP

X:SRXL,A2

; Put 8 bits in A2

 

 

 

 

JCLR

#1,X:SSR,*

; Wait for TDRE to go high

 

 

 

 

MOVEP

A2,X:STXL

; echo the received byte

 

 

 

 

REP

#8

 

 

 

 

 

 

ASR

A

 

 

 

 

 

_LOOP6

 

 

 

 

 

 

 

 

MOVE

A1,R0

; starting address for load

 

 

 

 

MOVE

A1,R1

; save starting address

 

 

 

 

DO

A0,_LOOP4

; Receive program words

 

 

 

 

DO

#3,_LOOP5

 

 

 

 

 

 

JCLR

#2,X:SSR,*

; Wait for RDRF to go high

 

 

 

 

MOVEP

X:SRXL,A2

; Put 8 bits in A2

 

 

 

 

JCLR

#1,X:SSR,*

; Wait for TDRE to go high

 

 

 

 

MOVEP

A2,X:STXL

; echo the received byte

 

 

 

 

REP

#8

 

 

 

 

 

 

ASR

A

 

 

 

 

 

_LOOP5

 

 

 

 

 

 

 

 

MOVEM

A1,P:(R0)+

; Store 24-bit result in P mem.

 

 

 

_LOOP4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure A-1 DSP56002 Bootstrap Program (Sheet 2 of 3)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOTOROLA

BOOTSTRAP AND ROM CODE

A - 5

 

 

 

For More Information On This Product,

 

 

 

 

 

Go to: www.freescale.com

 

 

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

INTRODUCTION

;This is the exit handler that returns execution to normal

;expanded mode and jumps to the RESET vector.

BOOTEND ANDI

#$EC,OMR

; Set operating mode to 0

 

 

; (and trigger an exit from

 

 

; bootstrap mode).

ANDI

#$0,CCR

; Clear CCR as if RESET to 0.

 

 

; Delay needed for Op. Mode change

JMP

(R1)

; Then go to starting Prog addr.

; End of bootstrap code. Number of program words: 64

Figure A-1 DSP56002 Bootstrap Program (Sheet 3 of 3)

A - 6 BOOTSTRAP AND ROM CODE MOTOROLA

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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

APPENDIX B

PROGRAMMING SHEETS

The following pages are a set of programming sheets intended to simplify programming the various DSP56002 programmable registers. The registers are grouped between the central processing module and each peripheral. Each register includes the name, address, reset value, and meaning of each bit. The sheets provide room to write the value for each bit and the hexadecimal equivalent for each register.

MOTOROLA

B - 1

For More Information On This Product,

Go to: www.freescale.com

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

SECTION CONTENTS

 

B.1

PERIPHERAL ADDRESSES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-3

 

 

B.2

INTERRUPT VECTOR ADDRESSES . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-4

 

 

B.3

INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-5

 

 

B.4

CENTRAL PROCESSOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-10

 

 

B.5

GP I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-14

 

 

B.6

HOST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-16

 

 

B.7

SCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-21

 

 

B.8

SSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-24

 

 

B.9

TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B-27

 

 

 

 

 

 

 

 

 

 

 

B - 2 MOTOROLA

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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

PERIPHERAL ADDRESSES

 

 

 

23

 

16

15

8

7

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFFF

 

 

 

 

 

 

 

 

 

 

 

 

INTERRUPT PRIORITY REGISTER (IPR)

 

 

 

 

 

 

X:$FFFE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT A — BUS CONTROL REGISTER (BCR)

 

 

 

 

 

 

X:$FFFD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PLL CONTROL REGISTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFFC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE GDB REGISTER

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFFB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFFA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI HI - REC/XMIT DATA REGISTER (SRX/STX)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI MID - REC/XMIT DATA REGISTER (SRX/STX)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI LOW - REC/XMIT DATA REGISTER (SRX/STX)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI TRANSMIT DATA ADDRESS REGISTER (STXA)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI CONTROL REGISTER (SCCR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI INTERFACE STATUS REGISTER (SSR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFF0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SCI INTERFACE CONTROL REGISTER (SCR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFEF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSI RECIEVE/TRANSMIT DATA REGISTER (RX/TX)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFEE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSI STATUS/TIME SLOT REGISTER (SSISR/TSR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSI CONTROL REGISTER B (CRB)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFEC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SSI CONTROL REGISTER A (CRA)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFEB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST RECEIVE/TRANSMIT REGISTER (HRX/HTX)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFEA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST STATUS REGISTER (HSR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HOST CONTROL REGISTER (HCR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT C — DATA REGISTER (PCD)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT B — DATA REGISTER (PBD)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT C — DATA DIRECTION REGISTER (PCDDR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT B — DATA DIRECTION REGISTER (PBDDR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT C — CONTROL REGISTER (PCC)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFE0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PORT B — CONTROL REGISTER (PBC)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFDF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER COUNT REGISTER (TCR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFDE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TIMER CONTROL/STATUS REGISTER (TCSR)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= Read as random number; write as don’t care.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X:$FFC0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RESERVED

 

 

 

 

 

 

 

 

 

 

 

 

Figure B-1 On-

chip Peripheral

 

Memory Map

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOTOROLA

 

 

For More Information On This Product,

B - 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Go to: www.freescale.com

 

 

 

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

INTERRUPT VECTOR ADDRESSES

Table B-1 Interrupts Starting Addresses and Sources

Interrupt

 

 

 

 

 

 

Starting

 

 

 

 

 

 

Address

IPL

Interrupt Source

 

 

 

 

 

$0000

3

Hardware

 

 

RESET

$0002

3

Stack Error

$0004

3

Trace

$0006

3

SWI

$0008

0-2

 

 

 

IRQA

$000A

0-2

 

 

IRQB

$000C

0-2

SSI Receive Data

$000E

0-2

SSI Receive Data with Exception Status

$0010

0-2

SSI Transmit Data

$0012

0-2

SSI Transmit Data with Exception Status

$0014

0-2

SCI Receive Data

$0016

0-2

SCI Receive Data with Exception Status

$0018

0-2

SCI Transmit Data

$001A

0-2

SCI Idle Line

$001C

0-2

SCI Timer

$001E

3

NMI

$0020

0-2

Host Receive Data

$0022

0-2

Host Transmit Data

$0024

0-2

Host Command (default)

$0026

0-2

Available for Host Command

•

 

 

 

•

•

 

 

 

•

•

 

 

 

•

$003A

0-2

Available for Host Command

$003C

0-2

Timer

$003E

3

Illegal Instruction

$0040

0-2

Available for Host Command

•

 

 

 

•

•

 

 

 

•

•

 

 

 

•

$007E

0-2

Available for Host Command

 

 

 

 

 

 

 

B - 4 MOTOROLA

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

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