AN2757 Freescale Semiconductor / Motorola, AN2757 Datasheet - Page 7

no-image

AN2757

Manufacturer Part Number
AN2757
Description
MPC5200 Quick Start
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
4.3
Once the application is debugged using the “RAM Debug” or “ROM Image” targets, it can be re-built using the “Standalone BL”
target and programmed into the non-volatile Flash memory for a standalone operation. The following sections will briefly describe
how to use the CodeWarrior’s Flash Programmer to achieve the standalone operation.
4.3.1
After the system reset signal is de-asserted, the MPC5200 boot process begins at one of the two addresses 0x00000100 or
0xFFF00100 in the Boot CS space. The address selection depends on the state of the “B H/L” board configuration jumper:
After the Lite5200 board reset is released, the Boot CS space is mapped to the small area of non-volatile Flash memory at one
of the two addresses. It is a responsibility of the boot code to enable the rest of the Flash space and to remap the Flash space
using CS0 signal. The CS0 signal shares the physical pin with the Boot CS while using a different address-mapping registers.
Using the CS0 signal, even the Flash-running code is capable of remapping its own Flash space to the area not-overlapping with
the future RAM space. As the last step, the SDRAM controller and the RAM memory should be enabled and a code should be
relocated from Flash to RAM for execution.
The startup code of the MPC5200_Quick_Start “Standalone BL” target performs all the steps described above to prepare the
Lite5200 board for running the application. By default, a firmware is factory-programmed at the end of non-volatile Flash memory
for the “boot-high” mode. The “Standalone BL” target uses “boot-low” mode so application may co-exist with the firmware code
in the Flash memory. Setting the “B H/L” jumper to the “boot-low” or “boot-high” option selects either an application or a firmware
for an execution. See also the
4.3.2
CodeWarrior Flash Programmer is an application which can be used to program a target Flash memory over the BDM interface.
In theory, the Flash Programmer performs the following tasks:
As all the operations, including the system reset, are performed by the Flash Programmer over a BDM interface, the target
MPC5200 does not need to be in known state prior programming. The Flash Content may even be totally corrupted while the
Flash Programmer can still re-program it.
To make the “Standalone BL” application really standalone, select menu “Tools / Flash Programmer” in the CodeWarrior IDE. In
the Flash Programmer window
the “sample_applications\CodeWarrior\Lite5200” folder within the MPC5200_Quick_Start installation folder (typically
“C:\Program Files\MPC5200_Quick_Start”).
On the first “Target Configuration” page, the user specifies the debugger configuration file to be used to initialize the target
system. As the Flash Programmer was invoked with the CodeWarrior Project and “Standalone BL” target active, the default
Debugger Configuration file for the target will be used (see
The “Target Memory Buffer Address” and “Size” define the RAM memory area used by the Flash Programmer for its operation.
Note that addresses loaded from “flash_prog.xml” configuration file specify a post-reset location of the MPC5200 Static RAM
memory, which is always valid and there is no need to use SDRAM memory.
Freescale Semiconductor
Boot-Low - at address 0x00000100 with an exception prefix set to 0x00000000 (MSR.IP bit cleared).
Boot-High - at address 0xFFF00100 with an exception prefix set to 0xFFF00000 (MSR.IP bit set).
Uses the CodeWarrior debugger initialization file to reset and set up the MPC5200 target over BDM (see
Debugger Initialization
Uses the BDM interface to download a Flash burning algorithm (a driver) suitable for the Flash memory selected by the
user
Uses the BDM interface to instruct a driver to perform requested operation (Flash Blank Check, Sector Erase, Memory
Write). When any data are needed to be passed to the driver, it is downloaded by the BDM interface as well.
Making the Application Standalone
Lite5200 Boot Process
CodeWarrior Flash Programmer
AN2757 MPC5200 Quick Start and Graphical Configuration Tool
Section 5.3, Startup Code
(Figure
Files)
6), first press the “Load Settings...” button and load the “flash_prog.xml” file located in
later in this document.
Section 5.2.3, Debugger Initialization
MPC5200 Quick Start Projects
Files).
Section 5.2.3,
7

Related parts for AN2757