I am trying to invoke the BSL from my user code on a MSP430F5514 with the following code:
{
typedef void (* __data16 functionpointer)(void);
const functionpointer bsloader = (functionpointer)(0x1000);
USB_disconnect();
USB_disable();
// SYSBSLC &= ~(SYSBSLPE | SYSBSLOFF); //Tried with or without this line
__disable_interrupt();
// enter BSL
bsloader();
}
It does not work, all I get is a hung CPU. Is there anything I'm missing? I also tried to jump to 0x1002 instead, in this case the CPU does restart the user program but not start the BSL. On my Hardware the PUR is pulled low with 1M. I can invoke the BSL by pulling PUR high while doing a reset.