System functions cover the configuration, status and control of a number of miscellaneous and loosely coupled features. These are managed by the system variables and other commands and variables, as follows:
Configuring Command API Format
Gecko OS commands can be entered manually via a Gecko OS terminal or automatically by a host MCU system.
There are optimizations for human Command API format and machine Command API format.
|Variable||Human Format||Machine Format|
|system.cmd.format (sets format variables)||human||machine|
See also Serial Interface, Commands and Streaming.
Power consumption can be minimized, and battery life extended, by a number of strategies.
There are independent powersave modes for the system as a whole, for the WLAN, and for the UART.
The system.powersave.mode variable allows the module to power down when idle, and power up in response to activity. Powersave mode is on by default. There is a range of system.powersave.mode settings:
- Deep Sleep
The uart.powersave.mode can be set to disabled or WAKE_EXTERNAL (e.g. wake on a pin transition).
The wlan.powersave.mode can be set to disabled, beacon skipping mode, or DTIM skipping mode.
The general procedure for configuring powersave is:
- set system.powersave.mode to minimize power usage, depending on your application requirements.
- set uart.powersave.mode if your application uses the UART.
- set wlan.powersave.mode if your application uses the WLAN.
- set further options for system powersave and WLAN powersave, if required:
Note: Low power modes do not work immediately after programming the device (including initial setup using GSS). The device must be power cycled after programming for low power modes to work. Power must be completely removed from the board. A reset is not sufficient.
Powersave Variable Notes
Idle timeout should be minimized to reduce overall power consumption. Timeout restarts every time a byte is transmitted or received on a UART. If you are continuously transmitting and/or receiving bytes on the UART, with a time between bytes shorter than the idle timeout, then the device does not sleep and no power is saved.
Other buses that restart the idle timer are SPI, I2C and Ethernet.
The device may take up to 20 microseconds to wake up.
When setting UART powersave mode to WAKE_EXTERNAL and using a pin interrupt on the RX pin, a delay may be required to allow the device to wake up before receiving bytes.
115200 baud the device starts quickly enough to receive the first byte.
At higher baudrates, you can insert space characters before commands. The command interpreter ignores a space character, but it still wakes the device.
The following examples cover typical powersave scenarios.
UART: Wakeup on UART RX
WLAN: Associated Idle with DTIM skipping
Note If using the UART command bus, wakeup on UART RX should be enabled so that deep sleep can be used. See above example.
Combined UART and WLAN powersave
To provide the greatest power savings, shut the system down completely. Gecko OS does not retain RAM and the kernel is not running.
To wake the system after shutdown, either a timeout or a wakeup GPIO must be provided.
After providing at least one wakeup method, run the shutdown command.
A specific set of GPIOs can be allocated for wakeup. This is platform dependent. Multiple GPIOs can be allocated. The GPIO wakeup levels can be individually set.
For full details, see the documentation of the shutdown command and variables.
Monitoring System State
System state can be monitored via visual indication by LED, system messages and GPIO level indication.
State monitoring variables:
Sub-system states can also be associated with GPIOs. See Peripherals.
For a detailed snapshot of system state get the values of all the Gecko OS variables:
Controlling the Boot Image
The boot image is by default
services.bin, but may be changed for various reasons.
If exceptions occur due to misconfiguration, the module may switch to safe mode, changing the boot image to
Boot image commands and variables:
System Identification and Version
Commands and variables: