AN2295 Freescale Semiconductor / Motorola, AN2295 Datasheet - Page 23

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
system reset status register (SRS) is tested. If a power-on-reset is not detected, the user code is started
instead of the bootloader code. This allows the transparent operation of all other resets (such as illegal
address, etc.) with only a short additional delay caused by testing of the SRSR register and executing
associated jump instructions.
Hardware Reset
In some implementations, a pin reset (caused by external reset pin) is a valid source of reset for the
bootloader to start. This allows remote in-circuit reprogramming in embedded applications that are able
to drive the HCS08 MCU reset pin.
HCS08 System Limitations
This section summarizes limitations that must be considered when using the bootloader with the user
application.
Memory Occupied
One of the strongest requirements is to use the smallest code possible. Typical HC9S08 implementations
are 432 bytes (minimal memory size that can be protected) plus another 64 bytes page for relocated
interrupt vector table.
The bootloader is placed at the upper end of FLASH memory, thus the only modification required in the
user code is in the memory mapping (typically found in the linker parameter file).
The HCS08 MCU signals the actual FLASH addresses that are available. The PC master software will
warn before programming if the user code overlaps with bootloader code.
Time Delay Upon Start-Up and Initial Communication
The number of pins that have specific meaning during bootloader start-up must be as small as possible.
Especially in communication systems (for example, those using a standard serial port), pin overhead is
zero and a “certain character at a certain time method” is used. So, the bootloader waits a certain amount
of time to receive an answer from the PC at startup. If none is received, the user code starts. The typical
delay is the range of several hundred milliseconds.
If this start-up delay becomes an issue for the final application, the user may modify the bootloader code
and use a “ certain level on certain pin ” method instead. A simple test of the voltage level on the IRQ pin
(or any other input pin) could be used to decide whether the bootloading sequence is required.
FLASH Protection Technique Not Usable
The bootloader uses a FLASH block protection technique to protect itself from being overwritten,
therefore this feature is not available for the user code. This includes FLASH memory security related
registers (namely NVPROT, NVOPT, and NVBACKKEY), which are used for protection and interrupt
vector relocation by bootloader.
Developer’s Serial Bootloader for M68HC08 and HCS08 MCUs, Rev. 6
Freescale Semiconductor
23

Related parts for AN2295