Jump to content

Store data in flash

Recommended Posts

Can anyone please help me how can i store a data/value in MC flash memory during prgram execution and use that value always (means after reset the launchpad)?????

i want to store ADC value in my launchpad memory and use that value algin after several reset.

Link to post
Share on other sites

Please specify the MCU you're using, so it makes easier to those who would help you to answer the question, as each MCU has its dedicated EEPROM management.


Of course, EEPROM management is included as a library in Energia.

Link to post
Share on other sites
  • 3 months later...
  • 2 months later...


I use MSP 430G2553 Laughpad V1.5, Energia  version E0012. So when i use Flash_read_write is very difficult. Hard to save value to segment of MSP.

I have code in CCS, i test it and see it good.

And then i convert this code to energia, i see have some mistake.

I dont know what this.

I think is Watdog, but i cant replace this mictake. Please see and check it for me.


Code CCS

#include "msp430g2553.h"
#include "stdio.h"
#include "Library/UART.h"
#include "Library/Flash.h"
void main(void)
unsigned char Temp[5],TempD[5];
long gtri,temp,temp1;
char buff[50];
char i;
WDTCTL = WDTPW | WDTHOLD; //Stop Watchdog
BCSCTL1 = CALBC1_1MHZ; //2 thanh ghi c
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...