Question
Save initial EEPROM data when burning MCU
When initially burning the MCU, I want to save some EEPROM data. Lets say the data 123 is to be saved in location 1 of EEPROM. If I write the below C code before the main function, will it work? Once the data is stored the first time the program is burnt into the MCU, I do not want it to be re-saved every time the program is run.
void EEPROM_InitData()
{
uint8_t data = 123;
FLASH_ProgramByte((FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 1) , data);
}
Thanks for your help!
PiSquared
