How to Read/Write permanently on MSP430F427 Flash memory using C code?

Status
Not open for further replies.

london

Member level 4
Joined
Jun 30, 2006
Messages
79
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,945
Hi All,
Pls Help me,
How to start a program Read/Write permanently on MSP430F427 Flash memory using C code. ie: i need to kept some values on flash memory even power sw off.
 

Re: Flash Memory

can i have some more details about the project. coz i have worked with flash memory programming. if u can tell me about ur requirements i can try my best to help u out.

Added after 2 minutes:

Usually the processor /controller details about how it responds to accessing block of data at one go is important. thats got frm the device on inquiry.

if u want me to explain more on this please mail me back . thank u

regards,
ashwini
 

Re: Flash Memory

/*
I assume that pnt is pointer to address in flash you wish to write to. some_info may be some struct you are writting to flash. Also you can stop timers while writting to flash.
*/

_DINT(); //disable interrupt
// Open Flash
FCTL1 = FWKEY + ERASE; // Set Erase bit
while (FCTL3 & BUSY);
FCTL3 = FWKEY; // Unlock флэш
while (FCTL3 & BUSY);
*pnt = 0; // Dummy write to erase Flash segment
FCTL1 = FWKEY + WRT;
while (FCTL3 & BUSY);
*pnt = some_info;
//Close Flash
FCTL1 = FWKEY;
FCTL3 = FWKEY + LOCK; // Lock флэш
while (FCTL3 & BUSY);
_EINT();// enable interrupt
 

    london

    Points: 2
    Helpful Answer Positive Rating
Re: Flash Memory

thanx
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…