herunterladen

Freescale Semiconductor
Application Note
Document Number: AN3561
Rev. 1, 05/2008
Contents
© Freescale Semiconductor, Inc., 2007. All rights reserved.
1 Introduction
This application note describes a bootloader for the
MC9S08JM60 allowing in-circuit reprogramming of the
flash memory via a universal serial bus (USB).
In-circuit programming (ICP) is a process where the
MCU is programmed or erased on the printed circuit
board that is the target system. This allows the user code
to be changed during product development, production,
and code upgrades.
The MC9S08JM60 provided by Freescale
Semiconductor is a member of the low-cost,
high-performance HCS08 family of 8-bit
microcontroller units (MCUs). It has a 60 KB embedded
flash memory that can be programmed or erased without
special voltage input. In-circuit programming is possible
through several communication paths. The
MC9S08JM60 has a USB 2.0 full-speed module, making
this MCU suitable for in-circuit programming via a USB
interface. The USB speed is fast and can program 60 KB
flash in 2–3 seconds, faster than a BDM cable.
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Bootloader Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1 Resources for the Bootloader . . . . . . . . . . . . . . . . . 2
2.2 Flash Memory Protection. . . . . . . . . . . . . . . . . . . . . 3
2.3 Vector Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 Software Startup Process . . . . . . . . . . . . . . . . . . . . 4
2.5 PC Driver and PC GUI Tool. . . . . . . . . . . . . . . . . . . 7
3 Tutorial for Bootloader Implementation . . . . . . . . . . . . . . 7
3.1 Software Integration . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 PC Driver Installation. . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Running PC GUI Tool . . . . . . . . . . . . . . . . . . . . . . 12
4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Appendix A Example Project . . . . . . . . . . . . . . . . . . . . . . . . . 18
USB Bootloader for the
MC9S08JM60
by: Patrick Yang
Asia & Pacific Operation Microcontroller Division