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

FDS erase

Hello,

I need to reset FDS. How can I get it's address / size in code ? How to erase it's area ?

Thank you.

Parents
  • Hi
    You can use nrfjprog for erasing the data in flash if it's not a part of your application. However, if it's part of your application then you can use nrf_fstorage_erase(). Flash can contain a lot of stuff, boot-loader, softdevice, application etc. Erasing flash would therefore require you to have an overview of its contents. If not, you can risk deleting the application itself. SES gives an overview of the content of flash after compilation. I would recommend  that you use the FDS module so that you avoid the scenario of having to erase the entire flash. The FDS module gives you a reference to data in flash with its files, and records. You write that you get a fatal error when you use  nrf_fstorage_erase(), could be more specific? What kind of error code is thrown? What are the parameters you use in  nrf_fstorage_erase()? 
    Jared 
Reply
  • Hi
    You can use nrfjprog for erasing the data in flash if it's not a part of your application. However, if it's part of your application then you can use nrf_fstorage_erase(). Flash can contain a lot of stuff, boot-loader, softdevice, application etc. Erasing flash would therefore require you to have an overview of its contents. If not, you can risk deleting the application itself. SES gives an overview of the content of flash after compilation. I would recommend  that you use the FDS module so that you avoid the scenario of having to erase the entire flash. The FDS module gives you a reference to data in flash with its files, and records. You write that you get a fatal error when you use  nrf_fstorage_erase(), could be more specific? What kind of error code is thrown? What are the parameters you use in  nrf_fstorage_erase()? 
    Jared 
Children
Related