Hi Antal,

On 16/02/16 16:04, Szabó Antal wrote:
I need to persistently store data in the device I'm developing, so I
thought I would save it to flash. How can I do this?

Yes, that is possible, ST has an application note about that [0]

I didn't find
anything in xpcc, so I would have to use some lower level functions I
think,

Yes, we have not implemented storing persistent data in flash yet.
However, we would be more than happy if you want to work on an implementation.

As many different micro controllers support writing to flash, I would suggest to separate the code into two layers: 1.) a low level hardware abstraction layer (HAL), that encapsulates low level access to the STM32 registers 2.) a high level layer that uses the HAL to access the flash and implements the required data organization and wear leveling techniques.


> but what I don't know is how to allocate space for the data in
the flash so it's on a separate page?

This probably has to be done in the linkerscript.
I think Niklas can tell you best how to specify a separate flash section for data.

Thank you for your great work!

Kevin

[0]: http://www.st.com/web/en/resource/technical/document/application_note/CD00165693.pdf
_______________________________________________
xpcc-dev mailing list
xpcc-dev@lists.rwth-aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/xpcc-dev

Reply via email to