cancel
Showing results for 
Search instead for 
Did you mean: 

STM32LXX eeprom initialized data

wilkxt
Associate II
Posted on April 26, 2014 at 10:33

Hi

I use STM32L151CC it has embeded EEPROM data 8KB, I now how to write or read from this memory, but I don't now how to initialize data in eeprom when I programming device.

Someone

knows how

to do it?

I use GCC compiler with eclipse.
2 REPLIES 2
Posted on April 26, 2014 at 14:14

Well, if your programming tools can write to EEPROM, then you could describe the section in the linker script, and then direct const data there.

Alternatively your code could determine it's on a blank device and write a block of default data out there. If the data is device specific (serial number, calibration, configuration), etc your code could enter a test mode allowing you to send/write data to EEPROM during production/final testing.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
wilkxt
Associate II
Posted on April 30, 2014 at 19:34

I use stlinkv2 and openocd with eclipse. Probably openocd  doesn't support program this eeprom.

I guess

I will have to

keep

a copy of the

data from the

EEPROM

in

flash

and

to program

it

after the start