Data backup using Mx_BrownOutInit(iIdx, level)

Hello repidM2M community,

is there a option to save the current data (position and state) on the device, in case the device is suddenly diconnected from power.
I want to use the Mx_BrownOutInit(iIdx, level) function to initiate a data backup on voltage drop event.
Is there a kind of memory that is persistent, to save data until the device is out of supply?
Or should I push the data direct to the portal if the BrownOut event occurs?

Kind regards,

Hello @mklueh,

The “Mx_BrownOutInit” function only activates the monitoring of the voltage supply input VIN of the rapidM2M M2xx. Once active the firmware of the rapidM2M M2xx calls up the public function whose index was transferred to the “Mx_BrownOutInit” function if a BrownOut is detected. All operations to store your data before the power is gone have to be done by your callback function. The last line in your callback function should be “Mx_Shutdown();” to inform the firmware about the shutdown. All pending writes are completed before the system is shut down. But be careful: A system reset is required to restore the full functionality after executing the “Mx_Shutdown()” function (see rapidM2M M22x System for more details)

The rapidM2M M23x is equipped with a FRAM for saving data in case of a power failure. If you are using an rapidM2M M22x you can use one of the configuration memory block (see Uplink -> rM2M_CfgWrite() or the “RM2M_REG_APP_FLASH” registration memory block (see Registry->rM2M_RegSetValue()). Of course you can also trigger a connection to the rapidM2M Portal to transfer the data which have not been saved.

The important thing for all the options mention above are the amount of energy which is left after the detection of the power failure. It must be ensured that the desired operation can still be performed in any case. For example, a small rechargeable battery can be connected to Vaux for this purpos. The rapidM2M M22x itself has no energy storage, which allows the execution of further operation to save or transfer the data after detecting a power failure.

Kind regards