Question
How to store user data in flash memory(stm32f207ig)
Posted on June 05, 2012 at 16:28
Hello All,
I have been trying to write into the flash(certain user data), but when i debug it i see the values being written elsewhere in other locations and sometimes in the location i have specified.The function i have used is as posted below.uint32_t FLASH_Pot_StartingAddress=((uint32_t)0x0807f800);void Flash_ADCPot_Log(void){FLASH_Unlock();FLASH_Pot_StartingAddress=FLASH_Pot_StartingAddress+2);FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR );FLASH_ProgramHalfWord(FLASH_Pot_StartingAddress, ADC_Result);FLASH_Lock();}ADC_Result is a 16 bit value.Any help would be appreciated, thanks