Skip to main content
This topic has been closed for replies.

12 replies

harinath
harinathAuthor
Associate III
August 3, 2014
Posted on August 03, 2014 at 07:00

Just finished porting this sample for STM32cube library package. It works without the fix proposed above.

info239955_stm1_st
Associate
February 10, 2016
Posted on February 10, 2016 at 23:47

Hi guys,

thanks for the great information you were sharing in this post!

So, I just also want to share some maybe useful informations regarding the ST EEPROM-emulation:

1. some hints to the old version (''standalone'' solution, based on STSW-STM32066):

Here I encountered the problem that every time my code was calling the EE_INIT() function on startup this function was completely erasing the page which was already marked as ERASED.

This erase process takes more than 1 second for my 128k page (I used sectors 10 and 11).

But besides that timing issue, I encountered that when loosing power while the erase process was ongoing, the next time I started the code and invoked EE_INIT(), this routineformats both pages because the erase process seems to set all bits to 0 and then backwards to 1 for the whole page which can leave the page in the state VALID.

So when interrupted the erased page had a lot of 0s at the beginning and 1s at the end! In this way this page was marked as VALID (0000) and so EE_INIT() get confused with two valid pages and formatted the whole EEPROM memory...

2. some hints on an error on the new version from the STM32Cube:

Here they implemented a new funtionality called ''EE_VerifyPageFullyErased'' to overcome the problem described before, so that is great. But anyway - it seems to me that this function just seems to work for Page0, but not for Page1:

So I think you should keep that in mind and correct the code when using this functionality...

best regards, Markus See attachments for some more details...

________________

Attachments :

STM32-EEPROM-Case1.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1GM&d=%2Fa%2F0X0000000bkS%2FOndQ7lUtS1loCIvxYEu2fsLExik.Q9CfpUqrbyHOSac&asPdf=false

STM32-EEPROM-Case2.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1GH&d=%2Fa%2F0X0000000bkR%2F1F7KaV35U9alHduvSbp7pzd3AHTVYAXmqrCEMpf7308&asPdf=false