cancel
Showing results for 
Search instead for 
Did you mean: 

***non volatile memory --- STM32F107

henriaghaei
Associate II
Posted on August 31, 2016 at 17:36

Previously, I worked on MSP430F47197. I learnt how to read/write from flash. That was pretty easy. On the other hand, using EEPROM was really confusing to read from and write into. (Using I2C Protocol)

Now, I am working on STM32F107KC.  More specifically, I am required to save Mac Address and reuse it for the next loading process. 

I have a written code and it seems that the Mac Address is stored within 1 page between the following addresses.

0x0803F800 --- 0x00000800

Also the linker file tells me that the rest of the code is written in the following range.

0x08000000 --- 0x0803FFFF  ==> ROM

0x20000000 --- 0x2000FFFF ==> RAM

Therefore, I do not see any overlapping case in here.

I also, checked the datasheet of STM32F107. There is no internal non volatile memory and in our board we do not have any external one.

Therefore, here is my question as follows. 

If there is no non-erasable memory, as I use IAR IDE for ARMS, can I go ahead and ask the compiler not to flash a certain range in flash and store my Mac Address there?  

In IAR IDE for MSPs, we are able to select which part of the memory to erase and flash under option menu which I do not see such feature in ARM.

Any other alternatives you may think that would be a good solution for Mac Address question?

3 REPLIES 3
Walid FTITI_O
Senior II
Posted on September 01, 2016 at 16:01

Hi aghaei.henri, 

you would use the

http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link004.html

which allow you the sector/pages to erase with other r/w functionalities.

-Hannibal-

henriaghaei
Associate II
Posted on September 16, 2016 at 15:57

Hi Hannibal,

Thanks for the reply!

Yes, I was able to use read/write flash successfully!

Posted on September 16, 2016 at 16:10

Please try and keep to one thread, if you create a thread, and the topic covers the same or evolving theme then stick to one.

>>0x08000000 --- 0x0803FFFF  ==> ROM

You'd presumably want to shrink that to 0x0803F7FF so as not to involve your sector with configuration data.

Some of the STM32 parts have a small amount of OTP, and BKP or RTC RAM, I'd have to review the F107

Managing configuration/calibration data is something I typically commit a FLASH sector too, and have a structure defined, and accessed via a pointer.

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