dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 264

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Program Controller
BEGIN_X
; Exact Sequence for Steps 3 through 5
; NOTE: Must Use Assembler Forcing Operator -- Forces 21-bit address
XMEM_TARGET
Choose the location of the first instruction in data memory carefully. The target addresses of the JMP
instructions in Example 8-13 on page 8-25 and Example 8-14, which are located in data memory, must be
known absolute addresses. Labels should not be used unless the technique that is shown in the examples is
employed. This technique defines the target code address as the same absolute address in both program and
data memory, which causes the assembler to generate the correct JMP target address.
8.6.2
When executing instructions from data memory is no longer required, and when it is necessary to begin
executing instructions from the program memory space, the following sequence of operations must be
performed:
Either the code sequence given in Example 8-15 on page 8-27 or the one in Example 8-16 on page 8-27
must be used for exiting data-memory execution mode. The sequence that is used depends on the size of
the target address specified by the JMP instruction. Because of the nature of this operation, it is very
important that the instruction segment between setting the XP bit (or clearing it) and the JMP instruction
should not be single stepped.
8-26
1. Disable interrupts in the status register.
2. Clear the XP bit in the operating mode register.
3. Jump to the return location in the program memory space.
4. Re-enable interrupts from code that is located in program memory space.
Exiting Data-Memory Execution Mode
EQU
ORG
.
.
.
BFSET
NOP
NOP
NOP
NOP
NOP
BFSET
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-14. Entering Data Memory Execution, 21-Bit Target Address
The code that is used to enter data-memory execution mode must contain
the exact number of NOP instructions that is shown in Example 8-13 on
page 8-25 or Example 8-14. There can be no jumps or branches to
instructions within this sequence.
$1000
P:
#$0300,SR
#$0080,OMR
>>XMEM_TARGET; Jump to 1st instruction in data memory
DSP56800E Core Reference Manual
; 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)
; (fetched but not executed)
; (fetched but not executed)
; (fetched but not executed)
NOTE:
Freescale Semiconductor

Related parts for dsp56800e