cancel
Showing results for 
Search instead for 
Did you mean: 

Saving variables to non volatile memory in STM32F429

Luis Ornelas
Associate
Posted on October 20, 2017 at 20:33

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?

2 REPLIES 2
Posted on October 22, 2017 at 15:01

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 23, 2017 at 06:07

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?