cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L EEPROM HARD WRITING

fiim
Associate III
Posted on December 23, 2011 at 07:33

Good day! The controller has a built-in EEPROM, which is very easy to program by software.

It don't suit me.

Can I program it during pouring code via the programmer(JLink)?

I use Keil4.21

#eeprom #jlink #keil
2 REPLIES 2
Posted on December 24, 2011 at 01:49

Both Keil and JFlasher provide scripting to read/write registers and memory that might permit you to achieve the task.

In Keil Options->Debug->Initialization File

Which can use WBYTE(), _WWORD(), _WDWORD() to write to the device, before/after uploading code to the device. Try looking at some of the .INI files in the \Keil\ARM\Boards directory for a mix of examples.

JFlasher also permits custom code to be uploaded in to RAM to perform more complex tasks, which could probably also be done with Keil's scripting too, but I haven't experimented.

Keil might also permit a special template for the EEPROM region under the Flash configuration, these are applets that perform part dependent programming.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fiim
Associate III
Posted on January 17, 2012 at 19:23

Thank You! May be the last option in more detail? I know that in the options there are 2 areas for flash-memory:IROM1 & IROM2. The address of the first I write 0x8000000(FLASH). The address of the second I write 0x8080000(EEPROM). Right? How to define an array of data in a program to burn it in the second region?