Hi!!
I try to use AN3275 for building a serial bootloader for MCU ->MC9S12GC64.
The application note is ok, and i can download firmware inside MCU by rs232!
If i set the PP0 pin user program start and if PP0 isn't set bootloader program start!
Now,
i try to change AN3275 code for jump to user code if i don't get serial character after approximately 3s.
Istruction for jump to user program is (after PP0 was checked..):
asm JMP [0xFFFE-BootBlkSize,pcr] /* Run user Program */
where:
BootBlkSize=0x1000; and:
0xFFFE-BootBlkSize=0xEFFE
Application note guide say:
"All the interrupt vectors except the
reset vector will be written in their normal locations. The reset vector will be written into address 0xEFFE
because the bootloader must own the reset vector to be able to determine if the user’s code or the
bootloader code is the one to be called."
But if i try to do jump:
asm JMP [0xFFFE-BootBlkSize,pcr] /* Run user Program */
after the istruction:
/* initialize the stack pointer */
INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */
the jump isn't ok and the user program don't start!!
What do you think about this?
Thanks!