Skip to main content
Gayathri Radhakrishnan
Associate
June 5, 2017
Question

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

  • June 5, 2017
  • 1 reply
  • 1405 views
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.

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    June 5, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Gayathri Radhakrishnan
    Associate
    June 5, 2017
    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.

    Chris1
    Associate II
    June 5, 2017
    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.