cancel
Showing results for 
Search instead for 
Did you mean: 

How to use EEPROM emulation as in AN3969?

Dan Mackie
Senior
Posted on September 06, 2017 at 01:50

In the ST code repository for cubemx on my PC, there is a projects directory for the STM32F429ZI-Nucleo containing a file called eeprom.c.  I am assuming that is the right source for this purpose.  The process seems fairly straight forward, but that is not the same as having it work.  I used the sample calls from the related main.c module, to read and write variables, and the system does not crash, but neither does the code seem to read and write flash.  Is there some Cubemx configuration required, such as enabling the flash system, and selecting NAND flash 1, for example?  Although it is not required at present, in future I would like to be able to use a flash file system to add new software to remote systems. I am guessing that AN3969 does not relate to the file system at all.  Comments from anyone who has this AN3969 mechanism in operation?

Thanks,

mailto:Dan.Mackie@DrSCADA.com

#an3969
2 REPLIES 2
Posted on September 06, 2017 at 03:19

It's not using NAND, external or otherwise.

It uses internal NOR FLASH, you need to carve a hole in the memory the linker is using so that it doesn't touch the sectors you plan on using for the emulation. How this achieved depends on your tool chain. In Keil by changing/splitting the IROM load regions, or within the scatter file, and on GNU/GCC by making a hole using the linker script..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 06, 2017 at 17:22

Thanks Clive – I’ll put that on the list of things to do. If it is that straight forward, perhaps

There is at least one bug in my interface as well.

Dan