AN2295 Freescale Semiconductor / Motorola, AN2295 Datasheet - Page 20

no-image

AN2295

Manufacturer Part Number
AN2295
Description
Developers Serial Bootloader for M68HC08 and HCS08 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
FC Protocol, Version 2, HC9S08 Implementation
FLASH Protection
By setting a FLASH protection register, all address space above this address is protected from both
intentional and unintentional erasing/re-writing. After the bootloader and the FLASH protection register
are programmed into memory, the bootloader code is protected from unintentional modification by user
code.
Example Memory Allocation
For example, the HC9S08GB/GT60 bootloader to the PC memory allocation is:
Interrupt Vector Table Relocation
If FLASH protection is enabled, the reset and interrupt vectors would be protected. Vector redirection
(HCS08 hardware feature) allows the user to modify memory allocation of interrupt vector information.
Vector redirection is enabled by programming the NVOPT (nonvolatile option) register. For redirection to
occur, at least some portion—but not all—of the FLASH memory must be block protected by programming
the NVPROT (nonvolatile protection) register. All of the interrupt vectors (memory locations
$FFC0–$FFFD) are redirected, but the reset vector ($FFFE:FFFF) is not.
For example, if 512 bytes of FLASH are protected, the protected address region is from $FE00 through
$FFFF. The interrupt vectors ($FFC0–$FFFD) are redirected to the locations $FDC0–$FDFD.
If an SPI interrupt is taken—for example—the values in the locations $FDE0:FDE1 are used for the vector
instead of the values in the locations $FFE0:FFE1. This allows the user to reprogram the unprotected
portion of the FLASH with new program code including new interrupt vector values while leaving the
protected area, which includes the default vector locations, unchanged.
20
$82 — Version 2, read command implemented (bit 7)
$r002 — System device identification register (SDIDR) content ($002 for GB/GT Family, r (four top
bits) is chip revision number reflecting current silicon level
$02 — Number of reprogrammable memory areas
$1080 — Start address of reprogrammable memory area #1
$1800 — End address of reprogrammable memory area #1 + 1
$182C — Start address of reprogrammable memory area #2
$FDC0 — End address of reprogrammable memory area #2 + 1
$FDC0 — Address of relocated interrupt vector table
$FFC0 — Start address of MCU interrupt vector table
$0200 — Length of MCU erase block
$0040 — Length of MCU write block
‘GB/GT60’,0 — Identification string, zero terminated. Information to be displayed on PC screen.
See
FLASH Protection Technique Not Usable
Developer’s Serial Bootloader for M68HC08 and HCS08 MCUs, Rev. 6
NOTE
for limitations.
Freescale Semiconductor

Related parts for AN2295