cancel
Showing results for 
Search instead for 
Did you mean: 

is there any external tool that could access EEPROM?

vicki19880929
Associate III
Posted on May 05, 2014 at 04:37

Hi all,

I'm using stm32l152rtc6 with built-in eeprom (8k).  I wonder if there's any tool at the host side that allows me to read/write the eeprom other than using ST library code for the mcu? (STM32L1xx_StdPeriph_Lib_V1.2.0\Project\STM32L1xx_StdPeriph_Examples\FLASH\Data_Program) In this way, the administrator could write data to eeprom, while the MCU user could not write but only read.

I did some search online, but haven't found a good tool for my purpose. :(  Hopefully it could be something like dfu-util.

  

Thanks,

Shan
7 REPLIES 7
vicki19880929
Associate III
Posted on May 06, 2014 at 04:46

I found that for Atmel user they could use avrdude terminal to dump the EEPROM message.  Any ideas for STM32L?   Thanks.

Posted on May 06, 2014 at 05:04

Well one could presumably use the System Loader, either via the protocol directly, or with a simple applet to access the EEPROM, or other external memories.

Keil offers the ''STM32L1xx Data EEPROM'' as one of the core applets
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vicki19880929
Associate III
Posted on May 06, 2014 at 05:58

Thanks clive,

I'll download Keil and give it a try.   Could you also point me to any applets for linux users as well if possible?   Really appreciated.  

de_koepi
Associate II
Posted on May 06, 2014 at 15:05

I don't know if this is useful for you, but for my STM32F103 dev board I use USB-to-RS232/UART communication on the USART1 pins. I have to set a switch (Boot0) and reset the board so that the firmware is in bootloader mode and doesn't start the user code. Then I can flash my code with

https://code.google.com/p/stm32flash/

Works on Mac OS X, should work as well on Linux.

os_kopernika
Associate II
Posted on May 06, 2014 at 23:13

There is an STM32 ST-link Utility available. It also supports the command line interface (easy to integrate with makefile)

vicki19880929
Associate III
Posted on May 07, 2014 at 04:47

Thanks a lot, Brutte!  

Didn't notice that stlink has such functionality.  I tried their software on Windows and am able to read/write EEPROM data.  I'll test it on Linux as well.  

Really appreciated.  :)

vicki19880929
Associate III
Posted on May 07, 2014 at 08:10

Hi all, 

With ST-LINK Utility, I can read/write EEPROM using ST_LINK_CLI.exe on Windows.

  1. ST_LINK_CLI.exe -w32 0x08080000 0x77FF
  2. ST_LINK_CLI.exe -r8 0x08080000 10
I tested with

https://github.com/texane/stlink

 on Linux and was able to read EEPROM using st-flash.

  1. st-flash read eeprom.hex 0x08080000 10

However, when I try to write the EEPROM with st-flash, there was an error:

[root@localhost stlink]$ st-flash write eeprom.hex 0x08080000

2014-05-07T14:03:24 INFO src/stlink-common.c: Loading device parameters....

2014-05-07T14:03:24 INFO src/stlink-common.c: Device connected is: L1 Medium-Plus-density device, id 0x10086427

2014-05-07T14:03:24 INFO src/stlink-common.c: SRAM size: 0x8000 bytes (32 KiB), Flash: 0x40000 bytes (256 KiB) in pages of 256 bytes

stlink_sram_flash() == -1

It seemed like address 0x08080000 (EEPROM starting address) is not accessible by st-flash.

I wonder if there is similar stlink tool like ST_LINK_CLI.exe in Linux?  Or did I do anything wrong?

Thanks.