Memory map handling for MOTOROLA's MC9S08 family on SPRINT Applicable for: - MOTOROLA MC9S08Gxxx Memory map: ----------- Sprint uses the native 64kB-memory space of MC9S08 devices. HIGH-PAGE REGISTER SPACE: $1800 - $182B (not programmable) NVBACKKEY: $FFB0 - $FFBF (flash) NVPROT: $FFBD (flash) NVOPT: $FFBF (flash) VECTOR SPACE: $FFC0 - $FFFF (flash) FLASH memory fills the 64-Kbyte memory map to $FFFF. The starting address of this block depends on how much FLASH memory is included in the MCU. For example if there is 32 Kbytes of FLASH, it will be located at $8000-$FFFF. If the FLASH memory block overlaps the high-page register space, the register block has priority so the FLASH locations at the conflicting addresses are not accessible. Sprint ignores the high-page register space. Nonvolatile flash protection register ------------------------------------- 7 6 5 4 3 2 1 0 NVPROT: FPOPEN FPDIS FPS2 FPS1 FPS0 0 0 0 ------------------------------------------------------- If FPOPEN is set to 0, the whole flash is block protected (no program or erase allowed, external access to memory allowed however). If FPDIS is set to 0, the Flash blocks specified by FPS2-FPS0 are block protected. Nonvolatile flash option register ---------------------------------- 7 6 5 4 3 2 1 0 NVOPT: KEYEN FNORED 0 0 0 0 SEC01 SEC00 -------------------------------------------------------- If KEYEN is set to 1 the 8 byte comparison key can be used to temporarily disengage memory security. This key mechanism can be accessed only through user code running in secure memory. With KEYEN set to 0 no backdoor key access allowed. The FNORED setting affects the vector redirection. 0 enables the vector redirection. Bits 1 and 0 of this byte defines the security state of the MCU. Only the combination SEC[1:0] = 10 defines the UNSECURED state, all others will prevent any access to the MC9S08 memory after the next reset. If you get the message "Ramload operation failed!" you possibly have a secured MCU. You can try to erase and reprogram the flash of the MCU.