User`s manual

*****************************************************************************
*****************************************************************************
*************************************************************
S>
With the bootloader and the D-Bug12 programmed in the flash memory, the target board
now becomes a true development board. That’s how we program the board before we
ship it. Your MiniDragon-Plus3 board actually becomes a programmer. You can then
repeat above steps as many times as you want. Just unplug the 6-pin BDM cable from
the target board, and then plug it into a new target board to program its flash memory with
these two files. You even don’t have to turn off the power while doing this.
For your convenience, we combined both the bootloader and D-Bug12 monitor into a
single s2 file named Boot_ DBug12v32_MDP3_16MHz .s29. In case you need to
update both of them, you can download this combined file.
The D-Bug12 monitor is an application program runs from the bootloader. If you program
the D-Bug12 portion of flash memory with your application program, your program will run
automatically in EVB mode after power up or reset. When running your code instead of
the D-Bug12 monitor, the bus speed is 8MHz, one half of the crystal frequency by default.
The PLL function must be initialized by your code for a higher bus speed, because the D-
Bug12 monitor firmware was not in flash memory anymore. For your convenience, we
include a PLL code template in chapter 7.
If you need to auto start your code upon reset, the procedure is available in the folder
named flash_programming.
3.1.4 BOOTLOADER mode: PAD1=1, PAD0=1
This bootloader allows you to erase/program flash memory and erase EEPROM. It is
mainly used to program the D-Bug12 monitor into flash memory or download a user’s fully
debugged code into the D-Bug12 portion of flash memory. The latter allows the board to
be operated in EVB mode and start your code every time the board is turned on or reset.
When you program your code into the D-Bug12 portion of flash memory, it wipes out the
D-Bug12 monitor. You can restore it any time, just as if you were downloading another
application program since the bootloader is not erased. You can erase and program the
D-Bug12 monitor portion of the flash memory of the MC9S12DG256 on its own board in
bootloader mode, but you cannot erase and program bootloader by itself. The bootloader
can only be erased by an external BDM via BDMin port.
After booting up in this mode, the LCD should display the following message:
“MiniDragon+2 EVB”
BOOT LOADER
and you should see the bootloader menu on PC screen:
MC9S12DG256 bootloader menu:
a) Erase Flash
b) Program Flash
c) Set Baud Rate
d) Erase EEPROM
?
21