Motorola CMD912x, DG128, 68HC912D60, DT128 manual Programming Flash Eeprom, #$7FE

Page 8

Programming Flash EEPROM

After debugging, you can program your application into Flash Memory so it executes automatically when you apply power to the board as follows:

1.Make a backup copy of HELLO.ASM then use a text editor to modify it.

2.Change the ORG location for the program start to the internal flash if needed.

3.Remove the comment ; character before one of the following lines to initialize the stack pointer which is necessary when running outside of a debugger:

LDS

#$3FFE

;

DG/DP128 or DP256 – initialize…

LDS

#$7FE

;

D60 - initialize the stack pointer

4.Remove the comment ; character from before the following 2 lines at the end, to set the reset vector to go to the beginning of the program (the label START) when powered on:

org

$fffe

reset vector

 

fdb

START

5.Re-Assemble HELLO.ASM as described in the "Assembling Source Code" section.

6.Select Program from the AxIDE menu and follow the message prompts. When prompted for a file name, enter the new HELLO.S19 file.

7.Press the RESET button on the board before clicking OK. When prompted to Erase, choose Yes.

8.When finished programming, REMOVE POWER then set the MODE SWITCH positions 1 and 2 OFF. Note: turn position 3 off also for DP256 version.

9.Re-Apply Power to the board. Your new program should start automatically and the “Hello World” prompt should be displayed in the terminal window.

To return to the Mon12 monitor program, set the MODE SWITCH positions 1 and 2 back ON then press RESET. Note: MODE switch 3 also must be ON for DP256 1K79 and earlier mask sets.

8

Image 8
Contents CMD912x Contents Board Startup Installing the SoftwareGetting Started Support Software Software DevelopmentTutorial Creating source codeAssembling source code AS12 HELLO.ASM -LHELLORunning your application Programming Flash Eeprom #$7FEBDM Operation Memory Maps PM12DP256 Memory MapPM12DG128 / PM12DT128 Memory Map Peripheral AreaPM12D60 Memory Map Peripheral Area see note 2 belowCOM Switch Option SwitchesConfig Switch Mode Switch PM12D60Ports and Connectors PRU PortPRU Port Connector McuportBusport COM2 Analog PortCOM1 CAN1 4 Ports Can 1 4 Port ConnectionsLcdport KeypadTB1 and J6 Power BDM PortTroubleshooting Tips and Suggestions UtilitiesLCD Character Codes LCD Command CodesTables Mon12 Monitor Commands BulkO Signal Connection Reference OtherPS4/MIOS