Levels of restarting on a device
There are two levels of restarting that can occur on an Azure Sphere device:
- Device reboot: The MCU restarts and consequently resets peripherals, reconnects to the network layer, and restarts the applications and the Azure Sphere operating system (OS).
- Application restart: The application restarts, but peripherals, connection to the network layer, and the operating system remain in their current state.
The following circumstances cause a device to reboot:
- An update of the Azure Sphere OS is installed.
- An application update changes the peripheral configuration and the peripheral configuration is locked.
- The device is unplugged from the USB port and plugged in again.
- The Reset button on the device is pressed.
- The
az sphere device restart
CLI command is run. - The
PowerManagement_ForceSystemReboot
function is called from a high-level application.
The following circumstances cause a high-level application or a real-time capable application to restart:
- An update of the application is installed.
- The application exits unexpectedly.
- An OS event or hardware event has occurred.
- The
az sphere device app stop
andaz sphere device app start
CLI commands are run.
Tasks that a high-level application should perform when starting or exiting are described in Initialization and termination. For details about when a high-level application or a real-time capable application should exit, see Lifecycle of an application.
For information about when a device checks for updates, see When do updates occur. Details about locking the peripheral configuration are described in Peripheral configuration locking.