herunterladen

Freescale Semiconductor
Application Note
Document Number: AN3958
Rev. 0, 10/2009
Contents
© Freescale Semiconductor, Inc., 2009. All rights reserved.
Freescale provides the USB bootloader solution for the
JS series of MCUs. This solution comprises the
ROM-based USB bootloader and the PC GUI.
(Flash-based USB bootloader is designed for the JM
family of MCUs, refer to AN3561 and AN3748).
You can use it easily without any modifications. The PC
GUI example provided by Freescale is a stand-alone
program which can run on the Windows XP platform
(SP2 or later version). The ROM-based USB bootloader
cannot be customized, but the software on the PC side
can be replaced according to different requirements.
Some knowledge or details about the USB bootloader
working scheme and protocol are discussed in this
application note, furthermore, how to re-use the flash
operation algorithm in 9S08JS16 boot ROM is also
involved. This provides the necessary information for
creating a new application with USB bootloader or
integrating the USB bootloader to an application on
a different platform (Linux or Mac).
1 Understanding the USB Bootloader Protocol . . . . . . . . . 2
1.1 Implementation of the USB Bootloader Command . 2
1.2 USB Bootloader Protocol. . . . . . . . . . . . . . . . . . . . . 4
2 Customizing the USB Bootloader Tool . . . . . . . . . . . . . . 4
2.1 USB Driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 S Record File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Develop Your Bootloader Tool . . . . . . . . . . . . . . . . 6
3 Utilizing the Flash Operation Algorithm in Boot Rom . . . 7
3.1 Variables Declaration . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Calling the Flash Operation Routine . . . . . . . . . . . . 8
3.3 Program or Erase Operation . . . . . . . . . . . . . . . . . . 8
4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Appendix AThe CodeWarrior Project for Using the Flash Algo-
rithm in Boot ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Integrating the MC9S08JS16/8 USB
Bootloader to Your Application
by: Derek Liu
Application Engineer