dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 263

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
8.6.1
A specific sequence must be followed to switch to executing programs from data memory. To enter
data-memory execution mode, perform the following steps:
These steps translate into one of two code sequences, which are shown in Example 8-13 and Example 8-14
on page 8-26. Depending on the size of the target address specified in the JMP to instructions in data
memory, a slightly different sequence must be used.
Example 8-13 shows the sequence that must be used when a 19-bit target address is used:
BEGIN_X
; Exact Sequence for Steps 3 through 5
; NOTE: Must Use Assembler Forcing Operator - Forces 19-bit Address
XMEM_TARGET
If a 21-bit target address is specified, the code sequence is slightly different. In particular, only a single
NOP instruction must be inserted between the BFSET instruction that sets the XP bit and the JMP
instruction (rather than two), and a different assembler forcing operator is specified in the JMP instruction.
This code sequence is given in Example 8-14 on page 8-26.
Freescale Semiconductor
1. Download the desired program—including interrupt vectors, interrupt service routines, and
2. Disable interrupts in the status register (SR).
3. Set the XP bit in the operating mode register (OMR).
4. Jump to the first instruction in data memory.
5. Re-enable interrupts from code in data memory (if desired).
data constants—into data memory.
Entering Data-Memory Execution Mode
EQU
ORG
.
.
.
BFSET
NOP
NOP
NOP
NOP
NOP
BFSET
NOP
NOP
JMP
NOP
NOP
NOP
ORG P:BEGIN_X,X:BEGIN_X; (both must be the same value)
; Remember to re-enable interrupts
Example 8-13. Entering Data Memory Execution, 19-Bit Target Address
$1000
P:
#$0300,SR
#$0080,OMR
>XMEM_TARGET ; Jump to 1st instruction in data memory
; Beginning address of program in data memory
; (indicates code located in program memory)
; Disable Interrupts
; (wait for interrupts to be disabled)
; (wait for interrupts to be disabled)
; (wait for interrupts to be disabled)
; (wait for interrupts to be disabled)
; (wait for interrupts to be disabled)
; Enable data memory instruction fetches
; (wait for mode to switch)
; (wait for mode to switch)
; (fetched but not executed)
; (fetched but not executed)
; (fetched but not executed)
Program Controller
Executing Programs from Data Memory
8-25

Related parts for dsp56800e