Dear,
I want to store few Instrument settings inside the controller memory & that can be modify in running application also like we do with eeprom memory.
Currently, I am using INFO A segment (0x1000 to 0x1400 )to store data but data could not rewrite untill erase the whole segment.
can you guide us how to over right data in this memory or do you have any other solution for this.
I am following below flow.
FCTL2 = FWKEY | FSSEL_1 | FN1 | FN3 | FN5; // MCLK/42 for Flash Timing Generator
if(FCTL3 & LOCKSEG) // If Info Seg is stil locked
{
FCTL3 = FWKEY | LOCKSEG; // Clear LOCKSEG bit
}
FCTL1 = FWKEY | WRT;
//addr is between 0x1000 to 0x1400 INFO A memory
void write_eeprom_memory( UINT16 addr , UINT16 value )
{
fram1_read = ( volatile UINT8 *)addr ;
*fram1_read = value ;
}
UINT8 read_eeprom_memory( UINT16 addr )
{
UINT8 temp8 ;
fram1_read = ( volatile UINT8 *)addr ;
return *fram1_read ;
}