下载
1 Introduction
This application note describes the boot operation of S12Z
core and how to implement and use a bootloader application
that can serially reprogram a device. The S12Z core is one of
the key differences between the MagniV family and other 16-
bit microcontrollers from Freescale. This document focuses on
describing how this core manages the boot process, the
memory layout and manipulation schemes, and the interrupt
management. The bootloader application shared with this
document can be matched with any serial communication
protocol driver to provide flexibility to the implementation.
Some popular alternatives for serial bootloaders are SCI,
CAN, or LIN, even though I2C, SPI, or even regular GPIO
(Bit-Banging) can be used. The bootloader application and the
communications driver are clearly separated to provide the
ability to replace and migrate the bootloader from one
application (and/or MagniV device) to another.
The S12Z MagniV Bootloader aims to be a cross platform
solution that can be easily ported to different MagniV devices.
It takes the advantage that all the MagniV devices with an
S12Z core share similar architectures. The bootloader was
designed to be small so that it can be placed on smaller
devices without consuming most of the storage resources. The
following sections will focus on describing the operating
characteristics of the S12Z core, the S19 record format,
considerations when developing code to be loaded with the
Freescale Semiconductor
Document Number:AN4723
Application Note
Rev 0, 07/2013
S12Z MagniV Bootloader
by:
Arturo Inzunza
© 2013 Freescale Semiconductor, Inc.
Contents
1 Introduction................................................................1
2 S12Z core operation..................................................2
3 S-Record format........................................................4
4 Bootloader software..................................................6
5 Implementing the MagniV Bootloader....................11
6 Developing code for the MagniV
Bootloader...............................................................14
7 PC Application program.........................................14
8 Conclusions.............................................................15
9 References...............................................................16