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.

MSP430FR5043: BSL resetting into the main application when sending the mass erase or password commands

Part Number: MSP430FR5043

Tool/software:

We have run into the same issue as mentioned in
https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1048612/msp430fr5969-sp-issue-invoking-bsl-through-software-using-serial-port-terminal
except with the MSP430FR5043 microcontroller.

  • We start the BSL via software.
  • As far as we can tell, this is running as expected
    • Sending an incorrect header correctly returns 0x51, and other errors are all correctly reported as well when using the correct header byte,

However, sending either mass erase, or the password packet (with the correct CRC) simply appears to reboot the code into the main application.

The post references a final solution involving disabling the MPU and re-configuring the UART.

We use the following code to start up the bootloader:

__disable_interrupt(); // disable interrupts

// Disable UART and its interrupts before jumping to BSL
UCA3IE &= ~UCRXIE; // Disable USCI_A3 RX interrupt
UCA3IFG = 0; // Clear interrupt flags

// Disable MPU (Memory Protection Unit)
MPUCTL0 = MPUPW | MPUENA; // Disable MPU

WDTCTL = WDTPW | WDTHOLD; // disables the watch dog
CSCTL0_H = CSKEY >> 8; // unlock clock registers
CSCTL1 = DCORSEL | DCOFSEL_3;  // DCO to 8MHz
CSCTL2 = SELS__DCOCLK | SELM__DCOCLK; // set SMCLK & MCLK to the DCO (digital controlled oscillator)
CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // divide clocks by 1
CSCTL0_H = 0; // lock registers
((void (*)()) 0x1000)(); // jump to BSL

We noted the project this was derived from had a predefined symbol "_MPU_ENABLE". However, with or without this symbol, the code still has the same issue when running the BSL.
We run into the same issue whether we allow the application to run, or whether we run this as the first thing in main()

Is there anything that is obviously missing from this?

**Attention** This is a public forum