Luis Miguel Freire wrote:
I need to save some data between resets and power losses, how is the best way?
there is only one, if the data should be available after removing the power: flash
there is some code in the examples that shows how to erase and write flash.
It's possible to uses the "reserve" attribute outside of the main function? how can access to that data?
that only reserves RAM, you could also place variables in the .noinit section, but thats again only RAM and wont hold on power loss.
chris