cancel
Showing results for 
Search instead for 
Did you mean: 

Store an integer array in FLASH memory of STM32F407 Discovery . How to program it?

Gayathri  Radhakrishnan
Associate II
Posted on June 05, 2017 at 16:18

I am new to STM microcontrollers and I am trying to store an interger array into my Flash memory of STM32F4 Discovery board. I request you to kindly help how to proceed from scratch. I am using IAR Embedded IDE.

5 REPLIES 5
Posted on June 05, 2017 at 17:25

You want the tool chain to place the array there, or are you looking to program part of the flash memory after the fact?

The libraries should contain examples of programming the flash.

For STM32 specific information refer to the Reference Manual, it describes the memory organization and flash.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 05, 2017 at 19:57

Can you please guide me to the examples of programming the flash memory to store this array.

Thank you.

Posted on June 05, 2017 at 23:32

If you know the values at compile time, you need only do something like this:

const int32_t TVA_LUT[8] =

{

    210, 209, 207, 206, 204, 203, 202, 201

}

The compiler will place this array in flash memory, due to the const type qualifier.

Posted on June 16, 2017 at 17:37

Thank you!

Posted on June 16, 2017 at 17:39

Thank you!