This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: Jumping to program at specific flash location at runtime

Part Number: MSP430G2553

I am working on a small bootloader for the MSP430. I cannot use the BSL loader because of pin restrictions for the project. 

Currently I am able to receive the firmware, write it to flash and verify it. I then use UNIFlasher to dump the flash afterwards and verify it again during development. All of this is working well. 

I am stuck where I set the program counter to the new firmware location and hope that everything works. However It does not seem to work correctly. In fact my current program just resets. At first I thought it was an artifact of the debugging but even when using the firmware without the debugger attached I had the same issues. Here is how I jump to the program from software. 

    __disable_interrupt();
    ((void (*)())0xCA20)();
 

I have tried a couple other things as well.

  • enable watchdog after setting the program counter
  • using assembly instructions directly (br and MOV), it compiles the same so don't think it will make a difference anyhow. 

Normally I would just step my way through the assembly and figure it out, but in this case I think debugging is having an effect. Any help would be great!

**Attention** This is a public forum