user_esp_platform_save_param save & load user params
Posted: Fri Mar 06, 2015 2:49 am
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?
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?