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/MSP430FR2433:~在从0xC400开始的 FRAM 上找到1KB 变量

Guru**** 2563960 points
Other Parts Discussed in Thread: MSP430FR2433

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/690801/ccs-msp430fr2433-how-to-locate-1kbyte-variable-on-fram-starting-0xc400

器件型号:MSP430FR2433

工具/软件:Code Composer Studio

各位专家、您好!

我们希望将 FRAM 用作 SRAM、因为有1KB 的可变数据、并且不足以用于 SRAM。 CPU 频率低于8MHz、因此访问性能无关紧要。

尝试几个#pragma 但未成功。

您能否为此用例提供任何示例代码?

此致、

Uchikoshi

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

    您好、Uchikoshi、

    您可以在 FRAM 中为变量定义一个段、修改 lnk_msp430fr2433.cmd、然后使用#pragma DATA_SECTION

    步骤1 --在 GROUP (READ_WRITE_MEMORY)中定义.textB 段

    / /*
    指定段分配到内存中 */
    ********* /
    
    SECTIONS
    {
    组(all_FRAM)
    {
    组(READ_WRITE_MEMORY)
    {
    .TI.persistent:{} 对于#pragma PERSISTENT *
    .textB :{}
    
    
    组(只读_存储器)
    {
    .cinit :{} /*初始化表 *
    .pinit :{} /* C++构造函数表 *
    二进制文件 :{} /*引导时初始化表*/
    init_array :{} /* C++构造函数表 *
    .mspabi.exidx:{} /* C++构造函数表 *
    .mspabi.extab:{} /* C++构造函数表 *
    .const :{} /*常量数据 */
    }
    
    GROUP (可执行文件存储器)
    {
    .textA :{} /* I2C BSL 代码*/
    .text :{}
    
    }> FRAM 

    步骤2 --通过#pragma DATA_SECTION 将您的数据链接到.textB 段。 可在此处找到指南:

    http://downloads.ti.com/docs/esd/SLAU132K/#SLAU132K_HTML/msp430_c_c_language_implementation.html#STDZ0559962 

     (第48页 B4) www.ti.com/.../slau157ap.pdf