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.

MSP430F5529: Branch to indirect address uses 20 bits for MSP430x when debugging

Part Number: MSP430F5529

Hello! For my application, I'm trying to jump back to the address stored in the reset vector 0xFFFE. I'm using `asm("    BRANCH &0xFFFE")` to do so. This seems to work alright in normal operation, but if I pause execution before the instruction and try to step through (like I was when trying to verify it works), the PC is always loaded with 20 bits from the memory at _reset_vector instead of 16. This is the case even if I skip the emulation instruction and use `MOV.W` directly. For example, with the memory below, I would expect the PC to be loaded with 0x06EAE, but it is loaded with 0xF6EAE instead. This only occurs when I pause execution at or just before the branch instruction. If I am simply connected to the debugger and start running from main, there is no issue. This is not the first time I have been burned by this behavior; am I missing something here? Why would a branch instruction load a 20-bit PC even with small code model?

**Attention** This is a public forum