Skip to main content
aamirali641989
Associate III
April 6, 2014
Question

STM32F205RBT6 flash as eeprom

  • April 6, 2014
  • 3 replies
  • 654 views
Posted on April 06, 2014 at 06:54

I need 10K eeprom.   I am planning to use flash for this. I am using keil

1. How to separate part of memory for eeprom , I mean where to mention it. So that it don't get overwritten by hex file.

2. Is there any exapmle code for this.
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    April 6, 2014
    Posted on April 06, 2014 at 07:35

    ST has posted

    http://www.st.com/web/en/catalog/tools/PF257897

    , but I don't think it will work in the manner you need.

    If you want to store configuration/calibration type data in flash, your best route would be to break the memory space up to free one of the 16KB sectors near the front of flash. This might be achieved by using the first 16KB for a Boot Loader, and pushing you application further into memory, perhaps to the 64 or 128KB boundaries. The

    http://www.st.com/web/en/catalog/tools/PF257899

    may help with this partitioning.

    Alternatively, you could create a custom scatter file, to allow the linker to create a void in the FLASH image to accommodate the sector(s) you want to write data into.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    aamirali641989
    Associate III
    May 13, 2014
    Posted on May 13, 2014 at 21:48

    Preferably better method may be to craete custom scatter file. That I will do.

    But how to read/write particular flash sectors of STM205RBT6. Is there any example code for it.

    Tesla DeLorean
    Guru
    May 13, 2014
    Posted on May 13, 2014 at 22:00

    STM32F2xx_StdPeriph_Lib_V1.1.0\Project\STM32F2xx_StdPeriph_Examples\FLASH\Program\main.c

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..