Specifications

Developer’s Serial Bootloader, Rev. 13
FC protocol, version 2, HC9S08 implementation
Freescale Semiconductor22
of the bootloader code. This allows the transparent operation of all other resets (such as illegal address and
so forth) with only a small additional delay caused by testing of the SRS register and executing associated
jump instructions.
4.5.2 Hardware reset
In some implementations, 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.
4.6 HCS08 system limitations
This section summarizes limitations that must be considered when using the bootloader with the user
application.
4.6.1 Memory occupied
One of the strongest requirements is to use the smallest possible code. 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, therefore, 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 available. The PC Bootloader software will warn
before programming if the user code overlaps with bootloader code.
4.6.2 Time delay upon startup and initial communication
The number of pins with specific meaning during bootloader startup 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 startup delay becomes an issue for the final application, the user may modify the bootloader code
and use a “certain level on certain pin” method. A simple test of the voltage level on the IRQ pin (or any
other input pin) can be used to decide whether the bootloading sequence is required.
4.6.3 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) used for protection and interrupt-vector
relocation by bootloader.