Skip to content

System

Enums

mira_sys_power_ctrl_t

Power regulator modes.

DCDC is the default value. Note that LDO mode consumes more power.

Name Description
MIRA_SYS_POWER_DCDC
MIRA_SYS_POWER_LDO

mira_sys_startup_reason_t

Possible reasons for a CPU reset.

Name Description
MIRA_SYS_STARTUP_REASON_POWER_ON
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

Hardware specific system configuration.

Except for setting the power_regulator, this is obsolete. Use the mira_license.py tool to configure the frontend instead.

If both are used, the config from the license/certificate area is used.

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

Name Type Description
frontend const mira_net_frontend_config_t *
power_regulator mira_sys_power_ctrl_t Set the power regulator type.

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

Name 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 value

Name 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.

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.