Part Number: MSP430FR5994
Crashing Boot Loader
Dear Sirs:
I’m writing a bootloader for the msp430fr5994. It has the following memory:
boot program from 0x5000 to 0x5fff
run program from 0x10000 to 0x1ffff
arrays from 0x4000
variables at around 0x2,000
And of course vectors at around 0xffff
The new program downloaded by the bootloader is an SREC hex file generated by the compiler.
It contains data starting at 0x4000 (because there is an array there) , the bootloader itself at 0x5000 and the new program at 0x10000.
The bootloader acts as a sort of executive that is called at startup time by the main memory.
It returns by user command and returns by doing a BOR restart. A variable in upper memory signals to the main program that it has been called.
What is different about this arraignment is that the bootloader is a module in the main code that is called during startup. However it is prevented from being downloaded by the bootloader but is put into memory by the TI debugger when it puts the rest of the program into memory first time. Subsequent program updates in the field are supposed to be done using the bootloader.
When the new program is downloaded it is stored from 0x24000 to 0x3ffff. Then if its checksum
Is ok it is programmed into run memory (at 0x4000 and 0xffff and 0x10000) by the bootloader.
Failure mode:
Everything works ok if the bootloader downloads the hex file for the program it resides in but if a different revision is downloaded the bootloader crashes when it is attempted to program the downloaded program into run memory. Then the bootloader crashes and ceases to operate correctly. It is almost as though the prog write triggers a stray interrupt.
Anyone have suggestions?
Thanks,
John