2017-10-20 11:33 AM
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?
2017-10-22 06:01 AM
Please edit the post so the scatter file is readable.
Consider using the BKPSRAM, ie the 4KB at 0x40024000 with a battery to maintain it (see Reference Manual), otherwise you're going to have to use a section of FLASH to store things.
2017-10-22 11:07 PM
Thanks for your answer. I havent realized that I had sent the code like that. I apologize for that. I have read a little about using the Backup SRAM registers but there's no much information. Have you done it before? Can you help me a little bit more with that?