System Calls


System.enterSafeMode, enterSafeMode

void enterSafeMode(SystemResetFlags flags = SystemResetFlags())

Since 0.4.6:

Resets the device and restarts in safe mode (blinking green, blinking cyan, followed by breathing magenta). Note that the device must be able to connect to the cloud in order to successfully enter safe mode.

In safe mode, the device is running Device OS and is able to receive OTA firmware updates from the cloud, but does not run the user firmware.

Since 2.0.0:

  • SystemResetFlags can be specified in Device OS 2.0.0 and later. There is currently only one applicable flag:

    • RESET_NO_WAIT reset immediately and do not attempt to notify the cloud that a reset is about to occur.

In Device OS 2.0.0 and later, a call to System.dfu() defaults to notifying the cloud of a pending reset and waiting for an acknowledgement. To prevent this, use the RESET_NO_WAIT flag.