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 复位到主应用程序中

Guru**** 2378650 points
Other Parts Discussed in Thread: MSP430FR5043
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1525655/msp430fr5043-bsl-resetting-into-the-main-application-when-sending-the-mass-erase-or-password-commands

器件型号:MSP430FR5043

工具/软件:

我们遇到了中所述的相同问题
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
MSP430FR5043微控制器除外。

  • 我们通过软件启动 BSL。
  • 据我们所知、此操作正在按预期运行
    • 发送错误的标头会正确返回0x51、使用正确的标头字节时、也会正确报告其他错误、

但是、发送批量擦除或密码数据包(具有正确的 CRC)似乎会将代码重新启动到主应用程序中。

这篇文章引用了一个最终解决方案、其中涉及禁用 MPU 和重新配置 UART。

我们使用以下代码启动引导加载程序:

__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

我们注意到了这个项目、它是从衍生出来的、具有一个预定义符号"_mpu_enable"。 但是、无论是否使用此符号、在运行 BSL 时、代码仍然存在相同的问题。
无论是允许应用程序运行还是作为 main()中的第一项运行、我们都会遇到同样的问题

这其中是否明显缺少任何内容?