Read/write data storage into Flash Memory in STM32f407 discovery using HAL
<p>I am trying to store the data inside the Flash (non volatile memory) for further retrieve. So that when the power is off and on again , then I can read the data from memory. </p>

<pre><code>uint32_t address = 0x0800C000;
uint64_t data = 0x01;
HAL_FLASH_Unlock();
HAL_FLASH_Program(TYPEPROGRAM_WORD, address, data);
HAL_FLASH_Lock();
</code></pre>

<p>But I am not able to store the data at this location, I dont know why?? And is there any function to read the data back from this location in HAL??</p>