The device I’m working on needs to be able to save user settings between resets (power still connected at minimum / power disconnected preferred)
I am actually using a NUCLEO L4A6ZG but MBED Studio doesn’t work with it so I program based on NUCLEO L496ZG (I know that this works fine)
Currently there are 3 bool, 6 uint23_t, and 4 uint16_t variables but more may be added later
(These are in a combination of structs and individual variables but can be combined or separated as needed for saving)
I have already looked into KVStore and NVStore:
-KVStore always returns NULL values even with the example code provided by MBED
-NVStore is not recognized by the compiler (I have to use MBED-os version 5.15.0 due to a few already developed elements that are required and already work perfectly
Ok, just for sure. Did you try to add a value via serial terminal?
For me it looks like this.
First run:
Simple KVStore test!
kv_get_info key: /kv/key
kv_get_info info - size: 134223333, flags: 536871912
No value
Place a new value to terminal!
Hello
Your value is Hello!
Now restart your board - Program end!
“Hello” is my input.
Second run:
Simple KVStore test!
kv_get_info key: /kv/key
kv_get_info info - size: 5, flags: 0
Stored value [Hello]!
Place a new value to terminal!
...
Thanks for your help. Ill try those suggestions for the text based things i need to save. But for some reason when I downgraded to os version 5.14.0 nvstore is working now after I add the path to nvstore.h