wipe the non-Volatile memory on the nrf52840 chip
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- willwade
- Posts: 50
- Joined: Sat Dec 01, 2018 3:04 pm
wipe the non-Volatile memory on the nrf52840 chip
Ive managed to write some data to the nrf52840 no-volatile memory - which is great. The only thing is I was wondering about a nifty trick of deleting this. Any suggestions? (Im on a feather express by the way)
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
Are you coding in Arduino or CircuitPython? Can you post an example of the NVRAM code you are using?
- willwade
- Posts: 50
- Joined: Sat Dec 01, 2018 3:04 pm
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
There is a public method called "remove" to takeout the file.
https://github.com/adafruit/Adafruit_nR ... leFS.h#L58
https://github.com/adafruit/Adafruit_nR ... leFS.h#L58
- willwade
- Posts: 50
- Joined: Sat Dec 01, 2018 3:04 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
OK. Im really stupid so apologies..
If I add a function say this..
I get a
Am I calling that function you note correctly??
If I add a function say this..
Code: Select all
void delete_devList(void)
{
Serial.println("at+deletedevlist");
file.delete(FILENAME);
Serial.println("SUCCESS. Now turn on and off. ");
}
Code: Select all
expected unqualified-id before 'delete'
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
Wouldn't it be remove as opposed to what you tried which was delete?
Code: Select all
// Delete the file.
bool remove (char const *filepath);
- willwade
- Posts: 50
- Joined: Sat Dec 01, 2018 3:04 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
:facepalm: You know when you look at something like 30 times.. and then again just before posting...
And I couldn't see that for the life of me. I really am stupid..
Thanks :embarrassed:
And I couldn't see that for the life of me. I really am stupid..
Thanks :embarrassed:
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: wipe the non-Volatile memory on the nrf52840 chip
@willwade,
It find it hard to keep the terminology straight as well. There are many implementations of littlefs and they each seem to use their own erase, delete or remove solutions.
Were you able to get working code? If so feel free to share it here.
It find it hard to keep the terminology straight as well. There are many implementations of littlefs and they each seem to use their own erase, delete or remove solutions.
Were you able to get working code? If so feel free to share it here.
Please be positive and constructive with your questions and comments.