Saving variables to non volatile memory in STM32F429
I have been reading so many post related to saving data to non volatile memory in STM32F4, but until now I haven't had success. I wonder if you can help me by doing this? Modifying my scatter file I have:
LR_IROM1 0x08000000 0x00080000 { ; load region size_region ER_IROM1 0x08000000 0x00080000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } A 0x20000000 UNINIT 0x00000100 { ;no init section *(.noinit) } RW_IRAM2 0x20000100 0x0000FFF0 { ;all other rw data .ANY(+RW +ZI) } ER_IROM2 0x08008000 UNINIT 0x00000FFF { *(nom_base) } }
The section nom_base supposes to be in flash memory, im sure the address is right but it doesn't do anything. The section no_init is working but it only survives the resets, if I power off the board, then the value is lost. I only want to save 4 variables status, or one or two. Can you help me telling me what Im doing wrong?