Topic : STM32, want to save parametars to flash area, help?

Forum : ARM

Original Post
Post Information Post
March 2, 2009 - 1:20pm
Guest

In my application I must save some parameters to FLASH to be able to restore function state after a power drop.

How do I allocate one or more FLASH pages for this use?

Must I make some changes to linker files (I'm new to STM32)?

How would I for example allocate the following to a FLASH area?

u32 params[10];

Replies
Post Information Post
+1
0
-1
March 8, 2009 - 11:58am
Guest

Hi,

You must read the PM0042 manual: STM32xxx Flash Programming, it´s all explain how to write in Flash.

And next, you must use pointers to allocate a Flash area...

+1
0
-1
March 9, 2009 - 10:15am
Raisonance Support Team

Hi,

The 'clean' way to allocate to flash is to modify the linker script.
See the linker documentation for more information.
(you can find some inspiration in the definition of the Flash bank1 in the default linker script of the STR71x devices)

Using pointers also works but then the linker will not warn you if there are overlaps, so you must be careful with your allocating.

Best Regards,

Vincent