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: how to store global variable in flash memory.

Part Number: MSPM0C1104

Hi,

I am using M0C1104 for i2c communication with oled. 

I have to declare one global variable for oled buffer that has 1024 size and some other global variables.

Due to that much size my SRAM size is going to 1272 but M0C1104 have only 1Kb SRAM.

thats why i am getting error.

is this possible to store global variable in flash memory.

  • Is SSD1306_buffer a constant? (I suspect not.)

    If so, I think you can put it in flash by declaring it "const".

    If not, you'll have to store into it with the Flash functions which (a) will be quite slow and (b) will wear out the Flash very quickly.

    I vaguely recall (it's been a while) that you can tell the SSD1306 to only use some (half?) of the rows, which will reduce the buffer size. The Adafruit Forum might be informative here.