Hi,

one example:

//==========================================================================//
//              Programs 1 word (16 bits) into the Flash memory             //
//==========================================================================//
void
FlashWriteWord (int *Data_ptr, int Word)
{
  FCTL3 = 0xa500;               // Lock = 0
  FCTL1 = 0xa540;               // WRT = 1
  *Data_ptr = Word;             // Program Flash word
  FCTL1 = 0xa500;               // WRT = 0
  FCTL3 = 0xa510;               // Lock = 1
  return;
}

//==========================================================================//
//                  Erases 1 Segment of Flash memory                        //
//==========================================================================//
void
FlashEraseSegment (char *Data_ptr)
{
  FCTL3 = 0xa500;               // Lock = 0
  FCTL1 = 0xa502;               // ERASE = 1
  *Data_ptr = 0;                // Erase Flash segment
  FCTL1 = 0xa500;               // ERASE = 0
  FCTL3 = 0xa510;               // Lock = 1
  return;
}



[email protected] schrieb am 02.03.04 08:03:33:
> 
> Hi
> I was wondering if its possible to write data directly just to the 
> Information Memory flash location of the MSP.  The basic idea is to have a 
> product, which has an ID stored at a given memory location (eg 0x1080), and 
> to be able to change that ID (through a GUI) without having to download the 
> whole program in each and every time.   I am aware that I can serially send 
> in the data to the MSP and then have the software in the MSP write it to 
> memory.  I'm interested in bypassing software and writing the data directly 
> to the memory.
> 
> Any help,  will be greatly appreciated.
> 
> Regards
> 
> Dipak
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users




Reply via email to