Hi:
i use SDK7.0 , i write data in flash (address:0x0003fc00)and the data is erased when SDK run.
and is there any way to protect the page that i want to write or other solution.thanks.
When the SoftDevice is enabled you should use sd_flash_page_erase() and sd_flash_write() functions. Please see Section 7 in the S110 SoftDevice Specification 2.0 for more information.
If the flash operation is succesful you will get a NRF_EVT_FLASH_OPERATION_SUCCESS event in sys_evt_dispatch(). I recommend you to have a flag that is set you do a flash operation, and is unset when you get NRF_EVT_FLASH_OPERATION_SUCCESS. Check the flag before you do a flash operation.
We also have a module for handling flash operations, Pstorage.
When the SoftDevice is enabled you should use sd_flash_page_erase() and sd_flash_write() functions. Please see Section 7 in the S110 SoftDevice Specification 2.0 for more information.
If the flash operation is succesful you will get a NRF_EVT_FLASH_OPERATION_SUCCESS event in sys_evt_dispatch(). I recommend you to have a flag that is set you do a flash operation, and is unset when you get NRF_EVT_FLASH_OPERATION_SUCCESS. Check the flag before you do a flash operation.
We also have a module for handling flash operations, Pstorage.