title: How to pick address in STM32 flash, where I want to store a variable that will remain after power shutdown?
body: <p>I want to store some variables in &quot;flash&quot; using function HAL_FLASH_Program(TypeProgram, Address, Data), so that they will retain after power shutdown. I am using STM32G071KB.</p>
  <p>What should I set the Address to? Maybe start of SRAM (0x20000000)?</p>
  <p>Reference manual:
  <a href="https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf" rel="nofollow noreferrer">https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf</a></p>