Hello Tom,
I don't have problems flashing data into the EEPROM. I am checking the word alignment and I am erasing a sector before wirting and all of that.. So far it seems to be working.
I couldn't be able to verify that the write function is working by checking the memory window in the debugger (I did the refresh, didn't show the udpate). I had to output the data via SCI to a terminal to verify that the variables in EEPROM have been updated..
It's just why the debugger doesn't show the udpate. If I am planning to flash unsigned int var[200] array into EEPROM, it's going to be defficult to output them all to a terminal to verify the successful flashing..
Here is my ee variables
#pragma DATA_SEG EE_DATA
unsigned int ee_variable;
unsigned int ee_variable1;
unsigned int ee_variable2;
unsigned int ee_variable3[2];
float f_ee_variable;
#pragma DATA_SEG DEFAULT
and :
/* EPROM */
EEPROM = NO_INIT 0x0400 TO 0x07FF;
Placement:
EE_DATA INTO EEPROM;
One more thing.. please have a look at these statements and tell me if they are correct:
"The minimum data size that can be flashed into the EEPROM is 16bit (Word)."
"Any word can't be flashed before erasing the sector in which it's located. For this reason, the wirte function has to locate the sector address and erase it as the word in it maybe sector-aligned or not."
"Flashing data that is less than 16bit (a byte) will require extra job. Such as reading the current word (in which the new byte is located), and then flashing the whole word back again. This is true also for 4byte data where the whole sector has to be read/erased/flashed (in case the 4bytes cover just one sector, if not then two sectors have to be read/erased/flashed)."
Thanks for your support..
Prog_ram..