Non volatile storage in NANO 33 BLE?

Hello all,

This is my first post in the forum, so thanks all in advance. Lately I have started several projects with different Arduino boards (NANO, UNO, Mega) with a great success. So I decided to give a try to the Nano 33 BLE for a new project which I had already solved with another microcontroller. All is fine and smooth by now but there is something that I think is essential for many projects: Non volatile storage. I have researched a bit and found some posts in the forum, but no answers to them. That's why I decided to ask it one more time.
In my research I found that nRF52840 microcontroller has dedicated libraries for this purpose (Flash Data Storage), then it should not be very difficult but I don't have enough knowledge yet to self develop a library.
Could someone give some help/advice on this?

The Arduino Nano 33 BLE uses mbedOS. You could try whether the mbedOS build in solution for non volatile storage kvstore is supported by the board. The source files are part of the installation. I did not have time to test it.

Here is a link to the documentation

KVStore - APIs | Mbed OS 5 Documentation.

There is an older solution called NVStore. You could give that one a try when kvstore does not work. I am not sure whether Arduino always uses the latest version of mbedOS or is a version behind.

https://os.mbed.com/docs/mbed-os/v5.15/apis/nvstore.html

Yes you can use the Flash for this. You will need to do this in Mbed using Blockdevice, for example LittleFileSystem: LittleFileSystem - APIs | Mbed OS 5 Documentation

I have tested this and it works.

Do you know if there's a step-by-step guide to use this LittleFileSystem?

I tried compiling the example given here;

https://os.mbed.com/docs/mbed-os/v5.15/apis/littlefilesystem.html

and immediately get a stack of compile errors, starting with;

LittleFileSystem:31:1: error: 'BlockDevice' does not name a type; did you mean 'USBDevice'?

I've no idea how to start fixing all of these.

I only need to store 2 floats and 1 byte (nano 33 BLE), and I'm wondering if I should buy an SD card reader now.

Strange, kvstore compiles perfectly fine for me (using PlatformIO)...