
MAXQ612/MAXQ622 User’s Guide
2-20 Maxim Integrated
Next, the RAM routine calls into the flash function. Once we are executing out of flash, we can activate the DP[0] pointer
without causing a memory fault because the MMU now maps RAM into address range 0–7FFFh and ROM to higher
addresses. None of this space is MPE protected. That flash routine would look similar to this:
// this routine must be implemented in flash
ReadRAM:
push DPC
move DPC, #18h
move DP[0], A[0]
move A[0] @DP[0]
pop DPC
ret
The corresponding RAM routine looks like:
;
; No pointer activation from RAM code
;
MOVE A[0], #REQUESTED_RAM_ADDRESS
LCALL ReadRAM
2.6.4 Debugging
Note that debugging system code (including trace, break, memory dump, etc.) is disabled once memory protection
is enabled.
2.6.5 Enabling Memory Protection
Memory protection is always enabled unless the system password is empty. Utility ROM initialization code is respon-
sible for checking the password and clearing the memory protection enable (MPE) bit.
2.6.6 Reset Procedure and Setup of Memory Protection
Utility ROM code as well as system and user loader code is responsible for setting up the memory protection boundaries.
Both passwords and memory area boundary definitions are loaded from code memory. These values are part of the sys-
tem, user loader, and user application image files, and are defined when assembling or compiling the code image files.
Example for the System Image:
org 0000h
; Reset
move CP, #usr_ldr_page
move ULDR, @CP
jump sys_init
org 000Fh
user_ldr_page:
; Starting page address of user loader
dw 0020h ; Page 32
org 0010h
; System password
dw …, …, …, …
org 0020h
interrupt0:
Comentários a estes Manuais