-->
Page 1 of 1

user_esp_platform_save_param save & load user params

PostPosted: Fri Mar 06, 2015 2:49 am
by Rajeev
Hi All, I have looked up at the code for the functions user_esp_platform_load_param and user_esp_platform_save_param

It appears to be saving and loading some parameters (4 byte aligned) into one of the sectors alternatively and storing an associated flag in another sector.

My question is - Is it done to achieve wear levelling of flash memory. I ask this because the sector where flag is being stored is erased each time when we store (save) the params. Then how come this is reducing the wear? How does it differ from storing and saving the params in one sector ? Do we get any benefit

Alternatively, if there is some other functionality being achieved by this code fragment, can anyone please explain the same?

Re: user_esp_platform_save_param save & load user params

PostPosted: Sun Mar 08, 2015 7:29 pm
by Rajeev
I myself have resolved it. The code referred in OP is just to save the two versions of state of variables and when called for reload, it loads the last value save in flash ram.

This, no way helps in wear levelling of fash or optimizing the usage.