This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flash write works, but when i do hard/soft reset data is lost ?

Hi, i'm using a code to save 4 bytes on the flash memory and it works. In, fact i checked the data address concerned using the keil and i see the changes when i write and it works well (data address 0x0003F400 ). I used this method before on another project (using another SDK and SD 130 0.9alpha) and now i'm using s130_nrf51_2.0.0-7.alpha_softdevice and another SDK of course.. It 's really strange, every thing is ok, i can write and change data values , only when i reset, every thing become FF FF FF FF :( Any idea please to check my code ?

Parents Reply Children
  • i made it the right answer by accident. Ok i find that there is somewhere in the program , just before i use my own pstorage initialisation ,there is another one done for the connection bonding, in fact there is a flash erase to erase all data of bonding and the use that initialized memory for bonding later if there is an OTA. What i did so is to take my information from the address 0x0003f400 (doing init pstorage and load data) then let the previous code of deleting flash and after that i write my data that i just loaded( so do an init again and this time call store function after a clear on the 0x0003f400 address) to be sure that it will be the same for another reset. The functionality i added is working well now, but i'm scared that will have a bad impact for bonding and loading context if there if an OTA :/

Related