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.

[参考译文] MSPM0C1104:如何将全局变量存储在闪存中。

Guru**** 2589300 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1327293/mspm0c1104-how-to-store-global-variable-in-flash-memory

器件型号:MSPM0C1104

您好!

我使用 M0C1104与 OLED 进行 i2c 通信。  

我必须为 OLED 缓冲器声明一个大小为1024的全局变量和一些其他全局变量。

由于该大容量、我的 SRAM 大小将达到1272、但 M0C1104只有1Kb SRAM。

这就是为什么我遇到了错误。

将全局变量存储在闪存中是可行的。

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

    SSD1306_BUFFER 是常数吗? (我怀疑没有。)

    如果是、我认为您可以通过声明它"常量"将其放入闪存中。

    如果不是这样、您将必须在其中存储闪存函数、这些函数(a)将非常慢、(b)将非常快地擦除闪存。

    我模糊地记得(已经有一段时间了)、你可以告诉 SSD1306只使用一些(半?) 这将减小缓冲器的大小。 Adafruit 论坛在这里可能会提供有用的信息。