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.

[参考译文] CCS/MSP430F5528:由于功率消耗大,在RAM中存储浮点变量

Guru**** 2537600 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/577119/ccs-msp430f5528-storing-floating-point-variables-in-ram-due-to-power-intensive

部件号:MSP430F5528

工具/软件:Code Composer Studio

大家好,

我有10个浮点变量需要保护以避免耗电并存储它们的最新值。 ULP顾问建议将它们移至RAM。

我该怎么做?

谢谢

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

    因此变量是恒定的。

    从其声明中删除'const'修饰符,它们将被移动到RAM中。

    此致,

    Peppe

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

    变量不是恒定的。

    例如:

    浮子K3 = 1.0 ;
    浮点Q_SES;
    静态浮点Forecast_t,Forecast_T1;

    Q_SES = Forecast_T1 * K3;
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    浮子K3 = 1.0 ;
    浮点Q_SES;
    静态浮点Forecast_t,Forecast_T1;

    Q_SES = Forecast_T1 * K3;