Operating Mode Register (OMR)
DSP56366 24-Bit Digital Signal Processor User Manual, Rev. 4
Freescale Semiconductor 4-3
The Instruction Cache should be initialized with the new instructions according to the following
procedure:
These steps should be executed from external memory or by download via host interface:
1. Set Cache Enable = 1
2. Set Patch Enable = 1
3. Initialize TAGs to different values by unlock eight different external sectors
4. Lock the PATCH sector(s)
5. Move new code to locked sector(s), to the addresses that should be replaced
6. Start regular PROM program
;****************************************************************************
; PATCH initialization example
;****************************************************************************
page 132,55,0,0,0
nolist
INCLUDE "ioequ.asm"
INCLUDE "intequ.asm"
list
START equ $100 ; main program starting address
PATCH_OFSET equ 128 ; patch offset
M_PAE equ 23 ; Patch Enable
M_PROMS equ $ffafec ; ROM area Start
M_PROME equ $ffafff ; ROM area End
org P:START
move #M_PROMS,r0
bset #M_CE,sr ; CacheEnable = 1
bset #M_PAE,omr ; PatchEnable = 1
move #$800000,r1 ; any external address
move #128,n1 ; 128 for 1K ICACHE, sector size
move #(M_PROMS+PATCH_OFSET),r2
dup 8
punlock (r1)+n1 ; initialize TAGs to different
; values
endm
plock (r2) ; lock patch's sector
; (start/mid/end)
move #PATCH_DATA_START,r1
;
; replace ROM code by PATCH