AN2504 Freescale Semiconductor / Motorola, AN2504 Datasheet - Page 4

no-image

AN2504

Manufacturer Part Number
AN2504
Description
On-Chip FLASH Programming API for CodeWarrior Software
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2504/D
Defined Constants
Virtual Registers
4
Constant Name
COMMPORT
Get_Bit
FLBPR
FLCR
RAM
Start address of RAM
Communication port
FLASH block protect register
FLASH control register address
Address of routine to get a bit
address
on the communication port
On-Chip FLASH Programming API for CodeWarrior Software
Table 2
FLASH-programming API serves a variety of microcontrollers, the constants
are device specific.
As mentioned before, ROM-resident routines use sections of RAM to receive
parameters and output results. Extra care is needed when handling these
sections. For this reason, virtual registers have been created. The FLASH-
programming API uses this location in RAM for registers to configure ROM-
resident routines. There are different ways of assuring these virtual registers
work properly. Two ways of doing this are described here:
Both of these methods reduce the size of available RAM. There are other ways
of ensuring the integrity of the virtual registers without compromising RAM size
(refer to the
Description
Freescale Semiconductor, Inc.
For More Information On This Product,
In the [MY_PROJECT].prm file included in the project, change RAM
start to address RAM + 76 bytes. (For example, in HC908JL3 RAM
starts at address 0x80. Change it to 0x80 + 76 = 0xCC.) Doing this
assures that the virtual registers will be untouched by RAM variables,
though they are still susceptible to modification by the stack. Another
problem is that the RAM size is reduced by 76 bytes.
Place all variables manually. When declaring variables you can specify
the address at which you want to allocate them. Do not overlap any
variable with the virtual registers. This reduces the available RAM by 68
bytes.
lists all constants used within the FLASH-programming API. Since the
Techniques
Go to: www.freescale.com
Table 2. Constants
section).
908GR8
0xFED2
0xFF7E
0xFE08
PTA0
0x40
0xFECE
908KX8
0xFF7E
0xFE08
PTA0
0x40
908JL3/JK3
0xFE09
0xFE08
0xFF00
PTB0
0x80
MOTOROLA
908JB8
0xFE09
0xFE08
0xFF00
PTA0
0x40

Related parts for AN2504