Freescale AN3561 describes a USB bootloader for the MC9S08JM60 that enables in-circuit reprogramming of flash memory via USB.
This Freescale Semiconductor application note describes a bootloader for the MC9S08JM60 that allows in-circuit reprogramming of the flash memory through a universal serial bus (USB) interface. The MC9S08JM60 is a member of the low-cost, high-performance HCS08 family of 8-bit microcontrollers with 60 KB of embedded flash that can be programmed or erased without special voltage input.
The note covers the bootloader overview, resources, flash memory protection, vector redirection, the software startup process, and a tutorial for implementing the bootloader, including PC driver installation and the PC GUI tool.
| Embedded flash memory | 60 KB |
|---|---|
| Flash programming time | 2–3 seconds |
| Bootloader code size | less than 1 KB |
| Bootloader RAM usage | 70 bytes |
| Bootloader code address range | 0xFC00 to 0xFFAF |
| Bootloader variables address range | 0x00B0 to 0x00BA |
| USB clock requirements | 24 MHz bus clock and 48 MHz reference clock |
| On-chip regulator supply range | 3.9 V to 5.5 V |
| Document number and revision | AN3561 Rev. 1, 05/2008 |
The USB speed is fast enough to program 60 KB of flash in 2–3 seconds, faster than a BDM cable.
The bootloader uses only 70 bytes of RAM, with 11 bytes for bootloader variables and 59 bytes for flash programming/erasing.
A general-purpose input/output PTG0 is used for mode determination; if PTG0 is high the system enters user mode, otherwise it enters bootloader mode.