PDA

View Full Version : Pill Box Autostart


huffman
12-12-01, 09:39 AM
I'm working with the Pill Box 68HC12 embedded and am a little stuck on how to autostart the code.
According to the NMI manual, the starting address of the code needs to be placed at 0xfffe. I'm
assuming that only the 16 bit address needs to be put here with no jump command. What I can't
figure out is how to load this address into memory.

I'm using the IC12 compiler but I'm not clear on how to store a specific value at a specifc address
when the program downloads to eeprom. Any help would be appreciated.

nmitech
12-12-01, 12:14 PM
The NMIB-0012/0912 comes with the Serial Bootloader when purchased. The Serial Bootloader has only 2 commands (P)rogram or (E)rase. The (P) command allows you to program your S19 file through the serial connection. Without the serial bootloader you need to have a BDM cable and software in order to load your code to the flash. You can purchase the BDM cable & software from www.pemicro.com

The Serial Bootloader resides in the top 2k of 32K flash, 0xF800 - 0xFFFF. Once the Serial Bootloader installed, the user interrupts & reset vector is located from 0xF7C0 - 0xF7FF. To autostart your program from the Serial Bootloader, the address 0xF7FE- 0xF7FF (2nd reset vector) must contains your program execute address. Vector Jumper Table can be found on page # 7 in the manual.

You can always recover the serial bootloader, If the your program is crashed or you want to reload the new code into the flash by short out jumper J7.

huffman
12-13-01, 07:50 AM
I think I found the answer to my question. Write a reset ISR that starts the program. I wasn't clear
on this when I started this adventure.
Thanks for your assistance.