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.

[参考译文] MSP430F6779A:初始变量作为 MCU 复位后的分配

Guru**** 2392905 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1026467/msp430f6779a-initial-variable-as-the-assignment-the-after-mcu-reset

器件型号:MSP430F6779A

您好!

MCU 复位后、MSP430 MCU 初始变量是否作为赋值? (我们使用设置编译器 --zero_init off 设置易失性数据)

例如

volatile static uint16_t timeout = 4096; //初始变量作为 MCU 复位后的分配?

 

注:

IDE 版本:Code Composer Studio 10.1.1.00004

编译器版本:TI V20.2.1.LTS

谢谢、

Vasu Khwanyuen

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Vasu Khwanyuen

     由于使用了"易失性静态"、因此在 MCU 复位后超时值应为4096。

    谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好,李晓东

    变量发生了什么情况

    1. 从 LPM3唤醒?
    2. 软件 BOR (PMMSWBOR)?

    谢谢、

    Vasu Khwanyuen

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Vasu Khwanyuen

    该值(4096)将保持在 LPM3和 BOR 之后、因为这是"易失性静态"。 此值应由 C 编译器在闪存上分配。

    谢谢!