Save data on Nucleo F334R8 when powered by battery

Well, you are right I am using Mbed OS2.

I may try the MbedOS5 bare metal profile and configuring the .json file you mentioned.

Thanks for the guidance until now.