AnsweredAssumed Answered

How to store user data in flash memory(stm32f207ig)

Question asked by shetty.siddharth on Jun 5, 2012
Latest reply on Jun 7, 2012 by Clive One
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

Outcomes