Skip to content

System

Enums

mira_sys_power_ctrl_t

Name Value Description
MIRA_SYS_POWER_DCDC 0
MIRA_SYS_POWER_LDO

mira_sys_startup_reason_t

Name Value Description
MIRA_SYS_STARTUP_REASON_POWER_ON 0
MIRA_SYS_STARTUP_REASON_RESET_PIN
MIRA_SYS_STARTUP_REASON_WATCHDOG
MIRA_SYS_STARTUP_REASON_SOFT
MIRA_SYS_STARTUP_REASON_UNSPECIFIED
MIRA_SYS_STARTUP_REASON_UNKNOWN

Structs

mira_sys_module_config_t

Type Name Description
mira_net_frontend_config_t frontend Obsolete, use the mira_license.py tool to configure the frontend instead.
mira_sys_power_ctrl_t power_regulator Set the power regulator type.

Hardware specific system configuration.

This controls PA/front-end modes (combinations of bypass/active and rx/tx/idle, as well as antenna selection) and the power regulator.

Functions

mira_sys_module_config_register

mira_status_t mira_sys_module_config_register(
    const uint32_t                   config_id,
    const mira_sys_module_config_t*  config);

Register a configuration for a custom hardware module.

Gets an identifier to enable reference to said configuration.

Note: If used, must be called from mira_setup() .

Parameters

Parameter Description
config_id identifier for the config. This identifier must be flashed in the first uint32_t of sysconfig, for a module to load the corresponding registered configuration. Value must be within [0x4000..0x4003].
config the configuration for a custom module.

Return

Status of the operation.

Value Description
MIRA_SUCCESS The operation was successful.
MIRA_ERROR_INVALID_VALUE The configuration is not valid: pointer is NULL, GPIO pins are not correct or the power regulator config is invalid.
MIRA_ERROR_INVALID_ID The config_id is incorrect.

mira_sys_reset

void mira_sys_reset(
    void);

Resets the node.

mira_sys_get_startup_reason

mira_sys_startup_reason_t mira_sys_get_startup_reason(
    void);

Get the reason for the latest CPU startup.

Return

See enum mira_sys_startup_reason_t.

mira_sys_get_pc_before_watchdog_reset

uint32_t mira_sys_get_pc_before_watchdog_reset(
    void);

Get the PC register before the latest watchdog reset.

Return

Latest PC value before watchdog reset, sometimes corrupt. NULL before first watchdog reset.