Non volatile memory Nano 33 BLE Sense

I managed to save persistent state on Nano 33 BLE using the FlashIAPBlockDevice.

I found an example where they initiate the device to the upper half the flash memory using parameters 0x80000, 0x80000. I worked nicely for me.