cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L15x: Read previously saved data in internal EEPROM

asighinolfi9
Associate II
Posted on July 08, 2013 at 11:56

Good morning,

I need to manage the internal EEPROM of the STM32L151C6: i found some library function for erasing and programming (DATA_EEPROM_ProgramByte, etc..), but I was not able to find some function for Reading from the EEPROM the previous stored data.

If someone have had the same issue, could give me some advices?

Thank you in advance!

Andrea

#stm32l #eeprom #eeprom-rww
5 REPLIES 5
mk299
Associate III
Posted on July 08, 2013 at 12:39

You can directly read from the corresponding address, e.g.

#define SRC_ADDR 0x08080000   memcpy

(&dest, (

void

*) SRC_ADDR,

sizeof

(dest));

Posted on July 08, 2013 at 13:21

It should read just like any other memory within the address space, like RAM, ROM, FLASH

#define SRC_ADDR 0x08080000

uint32_t *mem = (uint32_t *)SRC_ADDR; // Or set a pointer to it, could be a structure

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
asighinolfi9
Associate II
Posted on July 08, 2013 at 14:05

thank you clive1 and kipp.michael, i'm trying!

kevinliao
Associate II
Posted on June 26, 2015 at 04:38

Would you please tell me how to write data into the internal EEPROM of stm32L152?

Thank you for answer.

Kevin
Posted on June 26, 2015 at 05:43

Review the example code

STM32L1xx_StdPeriph_Lib_V1.3.0\Project\STM32L1xx_StdPeriph_Examples\FLASH\Data_Program\main.c

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