SYSTEM - System Utils#

System API.

This module contains functions to read information such as RAM and Flash size, device unique ID, chip revision, family, and part number from DEVINFO and SCB blocks. Functions to configure and read status from FPU are available for compatible devices.

Modules#

SYSTEM_CalAddrVal_TypeDef

sl_hal_system_chip_revision_t

sl_hal_system_devinfo_adc_cal_data_t

sl_hal_system_devinfo_adc_offset_t

sl_hal_system_devinfo_adc_t

sl_hal_system_devinfo_temperature_t

sl_hal_system_features_t

SYSTEM_ChipRevision_TypeDef

Enumerations#

enum
SL_HAL_SYSTEM_PART_FAMILY_MIGHTY_21 = DEVINFO_PART_FAMILY_MG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
SL_HAL_SYSTEM_PART_FAMILY_FLEX_21 = DEVINFO_PART_FAMILY_FG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
SL_HAL_SYSTEM_PART_FAMILY_BLUE_21 = DEVINFO_PART_FAMILY_BG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
SL_HAL_SYSTEM_PART_FAMILY_MIGHTY_RCP_21 = DEVINFO_PART_FAMILY_MR | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
SL_HAL_SYSTEM_PART_FAMILY_UNKNOWN = 0xFF
}

Family identifiers.

enum
securityCapabilityUnknown
securityCapabilityNA
securityCapabilityBasic
securityCapabilityRoT
securityCapabilitySE
securityCapabilityVault
}

Family security capability.

enum
SL_SYSTEM_SECURITY_CAPABILITY_UNKNOWN
SL_SYSTEM_SECURITY_CAPABILITY_NA
SL_SYSTEM_SECURITY_CAPABILITY_BASIC
SL_SYSTEM_SECURITY_CAPABILITY_ROT
SL_SYSTEM_SECURITY_CAPABILITY_SE
SL_SYSTEM_SECURITY_CAPABILITY_VAULT
}

Family security capability.

enum
SL_SYSTEM_FPU_ACCESS_DENIED = (0x0 << 20)
SL_SYSTEM_FPU_ACCESS_PRIVILEGED_ONLY = (0x5 << 20)
SL_SYSTEM_FPU_ACCESS_RESERVED = (0xA << 20)
SL_SYSTEM_FPU_ACCESS_FULL = (0xF << 20)
}

Floating point co-processor access modes.

enum
systemPartFamilyMighty21 = DEVINFO_PART_FAMILY_MG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
systemPartFamilyFlex21 = DEVINFO_PART_FAMILY_FG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
systemPartFamilyBlue21 = DEVINFO_PART_FAMILY_BG | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
systemPartFamilyMightyRcp21 = DEVINFO_PART_FAMILY_MR | (21 << _DEVINFO_PART_FAMILYNUM_SHIFT)
systemPartFamilyUnknown = 0xFF
}

Family identifiers.

enum
fpuAccessDenied = (0x0 << 20)
fpuAccessPrivilegedOnly = (0x5 << 20)
fpuAccessReserved = (0xA << 20)
fpuAccessFull = (0xF << 20)
}

Floating point co-processor access modes.

Functions#

Get the MCU family identifier.

bool
SYSTEM_GetCalibrationValue(volatile uint32_t *regAddress)

Get a factory calibration value for a given peripheral register.

uint64_t

Get the unique number for this device.

uint8_t

Get the production revision for this part.

uint32_t

Get the SRAM Base Address.

uint16_t

Get the SRAM size (in KB).

uint16_t

Get the flash size (in KB).

uint32_t

Get the flash page size in bytes.

uint16_t

Get the MCU part number.

uint8_t

Get the calibration temperature (in degrees Celsius).

void
SYSTEM_ChipRevisionGet(SYSTEM_ChipRevision_TypeDef *rev)

Get a chip major/minor revision.

Get the MCU family identifier.

void
sl_hal_system_get_chip_revision(sl_hal_system_chip_revision_t *rev)
uint8_t

Get DEVINFO revision.

uint32_t

Get the default factory calibration value for HFRCO oscillator.

uint32_t

Get the speed factory calibration value for HFRCO oscillator.

uint32_t

Get the HFRCO calibration based on the frequency band.

uint32_t

Get a factory calibration value for HFRCOCEM23 oscillator.

uint32_t

Get a factory calibration value for HFXOCAL.

uint64_t

Get the unique number for this device.

uint8_t

Get the production revision for this part.

uint32_t

Get the SRAM Base Address.

uint16_t

Get the SRAM size (in KB).

uint16_t

Get the flash size (in KB).

uint32_t

Get the flash page size in bytes.

uint16_t

Get the MCU part number.

void
sl_hal_system_get_temperature_info(sl_hal_system_devinfo_temperature_t *info)

Get the temperature information.

void
sl_hal_system_fpu_set_access_mode(sl_hal_system_fpu_access_t access_mode)

Set floating point co-processor (FPU) access mode.

void
sl_hal_system_get_adc_calibration_info(sl_hal_system_devinfo_adc_t *info)

Get the ADC calibration info.

uint8_t

Get DEVINFO revision.

void
SYSTEM_FpuAccessModeSet(SYSTEM_FpuAccess_TypeDef accessMode)

Set floating point co-processor (FPU) access mode.

Macros#

#define
HFRCO_DPLL_FREQUENCY_TABLE_SIZE 11
#define
DEVINFO_TEMPERATURE_CALTEMP_INTEGER_SHIFT 4

Enumeration Documentation#

sl_hal_system_part_family_t#

sl_hal_system_part_family_t

Family identifiers.

Enumerator
SL_HAL_SYSTEM_PART_FAMILY_MIGHTY_21

EFR32 Mighty Gecko Series 2 Config 1 Value Device Family.

SL_HAL_SYSTEM_PART_FAMILY_FLEX_21

EFR32 Flex Gecko Series 2 Config 1 Value Device Family.

SL_HAL_SYSTEM_PART_FAMILY_BLUE_21

EFR32 Blue Gecko Series 2 Config 1 Value Device Family.

SL_HAL_SYSTEM_PART_FAMILY_MIGHTY_RCP_21

EFR32 Mighty RCP Series 2 Config 1 Value Device Family.

SL_HAL_SYSTEM_PART_FAMILY_UNKNOWN

Unknown Device Family. Family ID is missing on unprogrammed parts.


SYSTEM_SecurityCapability_TypeDef#

SYSTEM_SecurityCapability_TypeDef

Family security capability.

Enumerator
securityCapabilityUnknown

Unknown security capability.

securityCapabilityNA

Security capability not applicable.

securityCapabilityBasic

Basic security capability.

securityCapabilityRoT

Root of Trust security capability.

securityCapabilitySE

Secure Element security capability.

securityCapabilityVault

Secure Vault security capability.


sl_hal_system_security_capability_t#

sl_hal_system_security_capability_t

Family security capability.

Enumerator
SL_SYSTEM_SECURITY_CAPABILITY_UNKNOWN

Unknown security capability.

SL_SYSTEM_SECURITY_CAPABILITY_NA

Security capability not applicable.

SL_SYSTEM_SECURITY_CAPABILITY_BASIC

Basic security capability.

SL_SYSTEM_SECURITY_CAPABILITY_ROT

Root of Trust security capability.

SL_SYSTEM_SECURITY_CAPABILITY_SE

Secure Element security capability.

SL_SYSTEM_SECURITY_CAPABILITY_VAULT

Secure Vault security capability.


sl_hal_system_fpu_access_t#

sl_hal_system_fpu_access_t

Floating point co-processor access modes.

Enumerator
SL_SYSTEM_FPU_ACCESS_DENIED

Access denied, any attempted access generates a NOCP UsageFault.

SL_SYSTEM_FPU_ACCESS_PRIVILEGED_ONLY

Privileged access only, an unprivileged access generates a NOCP UsageFault.

SL_SYSTEM_FPU_ACCESS_RESERVED

Reserved.

SL_SYSTEM_FPU_ACCESS_FULL

Full access.


SYSTEM_PartFamily_TypeDef#

SYSTEM_PartFamily_TypeDef

Family identifiers.

Enumerator
systemPartFamilyMighty21

EFR32 Mighty Gecko Series 2 Config 1 Value Device Family.

systemPartFamilyFlex21

EFR32 Flex Gecko Series 2 Config 1 Value Device Family.

systemPartFamilyBlue21

EFR32 Blue Gecko Series 2 Config 1 Value Device Family.

systemPartFamilyMightyRcp21

EFR32 Mighty RCP Series 2 Config 1 Value Device Family.

systemPartFamilyUnknown

Unknown Device Family.


SYSTEM_FpuAccess_TypeDef#

SYSTEM_FpuAccess_TypeDef

Floating point co-processor access modes.

Enumerator
fpuAccessDenied

Access denied, any attempted access generates a NOCP UsageFault.

fpuAccessPrivilegedOnly

Privileged access only, an unprivileged access generates a NOCP UsageFault.

fpuAccessReserved

Reserved.

fpuAccessFull

Full access.


Variable Documentation#

SL_HAL_SYSTEM_DEVINFO_ADC_RESET_VALUES#

const sl_hal_system_devinfo_adc_t SL_HAL_SYSTEM_DEVINFO_ADC_RESET_VALUES

SL_HAL_SYSTEM_DEVINFO_TEMPERATURE_RESET_VALUES#

const sl_hal_system_devinfo_temperature_t SL_HAL_SYSTEM_DEVINFO_TEMPERATURE_RESET_VALUES

SL_HAL_SYSTEM_DEVINFO_ADC_RESET_VALUES#

const sl_hal_system_devinfo_adc_t SL_HAL_SYSTEM_DEVINFO_ADC_RESET_VALUES

SL_HAL_SYSTEM_DEVINFO_TEMPERATURE_RESET_VALUES#

const sl_hal_system_devinfo_temperature_t SL_HAL_SYSTEM_DEVINFO_TEMPERATURE_RESET_VALUES

Function Documentation#

sl_hal_system_get_family#

sl_hal_system_part_family_t sl_hal_system_get_family (void )

Get the MCU family identifier.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Family identifier of MCU.

Note

  • This function retrieves family ID by reading the chip's device info structure in flash memory. Users can retrieve family ID directly by reading DEVINFO->PART item and decode with mask and shift #defines defined in <part_family>_devinfo.h (refer to code below for details).


SYSTEM_GetCalibrationValue#

bool SYSTEM_GetCalibrationValue (volatile uint32_t * regAddress)

Get a factory calibration value for a given peripheral register.

Parameters
TypeDirectionArgument NameDescription
volatile uint32_t *[in]regAddress

The peripheral calibration register address to get a calibration value for. If the calibration value is found, this register is updated with the calibration value.

Returns

  • True if a calibration value exists, false otherwise.


SYSTEM_GetSecurityCapability#

SYSTEM_SecurityCapability_TypeDef SYSTEM_GetSecurityCapability (void )

Get family security capability.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves the family security capability based on the device number. The device number is one letter and 3 digits: DEVICENUMBER = (alpha-'A')*1000 + numeric. i.e. 0d = "A000"; 1123d = "B123". The security capabilities are represented by SYSTEM_SecurityCapability_TypeDef.

Returns

  • Security capability of MCU.


SYSTEM_GetUnique#

uint64_t SYSTEM_GetUnique (void )

Get the unique number for this device.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Unique number for this device.


SYSTEM_GetProdRev#

uint8_t SYSTEM_GetProdRev (void )

Get the production revision for this part.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Production revision for this part.


SYSTEM_GetSRAMBaseAddress#

uint32_t SYSTEM_GetSRAMBaseAddress (void )

Get the SRAM Base Address.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function is used to retrieve the base address of the SRAM.

Returns

  • Base address SRAM (32-bit unsigned integer).


SYSTEM_GetSRAMSize#

uint16_t SYSTEM_GetSRAMSize (void )

Get the SRAM size (in KB).

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves SRAM size by reading the chip device info structure. If your binary is made for one specific device only, use SRAM_SIZE instead.

Returns

  • Size of internal SRAM (in KB).


SYSTEM_GetFlashSize#

uint16_t SYSTEM_GetFlashSize (void )

Get the flash size (in KB).

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves flash size by reading the chip device info structure. If your binary is made for one specific device only, use FLASH_SIZE instead.

Returns

  • Size of internal flash (in KB).


SYSTEM_GetFlashPageSize#

uint32_t SYSTEM_GetFlashPageSize (void )

Get the flash page size in bytes.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves flash page size by reading the chip device info structure. If your binary is made for one specific device only, use FLASH_PAGE_SIZE instead.

Returns

  • Page size of internal flash in bytes.


SYSTEM_GetPartNumber#

uint16_t SYSTEM_GetPartNumber (void )

Get the MCU part number.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • The part number of MCU.


SYSTEM_GetCalibrationTemperature#

uint8_t SYSTEM_GetCalibrationTemperature (void )

Get the calibration temperature (in degrees Celsius).

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Calibration temperature in Celsius.


SYSTEM_ChipRevisionGet#

void SYSTEM_ChipRevisionGet (SYSTEM_ChipRevision_TypeDef * rev)

Get a chip major/minor revision.

Parameters
TypeDirectionArgument NameDescription
SYSTEM_ChipRevision_TypeDef *[out]rev

A location to place the chip revision information.


SYSTEM_GetFamily#

SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily (void )

Get the MCU family identifier.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves family ID by reading the chip's device info structure in flash memory. Users can retrieve family ID directly by reading DEVINFO->PART item and decode with mask and shift #defines defined in <part_family>_devinfo.h (refer to code below for details).

Returns

  • Family identifier of MCU.


sl_hal_system_get_chip_revision#

void sl_hal_system_get_chip_revision (sl_hal_system_chip_revision_t * rev)
Parameters
TypeDirectionArgument NameDescription
sl_hal_system_chip_revision_t *N/Arev

sl_hal_system_get_devinfo_rev#

uint8_t sl_hal_system_get_devinfo_rev (void )

Get DEVINFO revision.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Revision of the DEVINFO contents.


sl_hal_system_get_hfrco_default_calibration#

uint32_t sl_hal_system_get_hfrco_default_calibration (void )

Get the default factory calibration value for HFRCO oscillator.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • HFRCOCAL default value.


sl_hal_system_get_hfrco_speed_calibration#

uint32_t sl_hal_system_get_hfrco_speed_calibration (void )

Get the speed factory calibration value for HFRCO oscillator.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • HFRCOCAL speed value.


sl_hal_system_get_hfrcodpll_band_calibration#

uint32_t sl_hal_system_get_hfrcodpll_band_calibration (uint32_t frequency)

Get the HFRCO calibration based on the frequency band.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]frequency

Frequency for which to retrieve calibration.

Returns

  • HFRCOCAL value for the given band.

Note

  • Those calibrations are only valid for the HFRCO oscillator when used with the DPLL module.


sl_hal_system_get_hfrcoem23_calibration#

uint32_t sl_hal_system_get_hfrcoem23_calibration (void )

Get a factory calibration value for HFRCOCEM23 oscillator.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • HFRCOEM23 calibration value.


sl_hal_system_get_hfxocal#

uint32_t sl_hal_system_get_hfxocal (void )

Get a factory calibration value for HFXOCAL.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • HFXOCAL value.


sl_hal_system_get_security_capability#

sl_hal_system_security_capability_t sl_hal_system_get_security_capability (void )

Get family security capability.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves the family security capability based on the device number.

Returns

  • Security capability of MCU.


sl_hal_system_get_unique#

uint64_t sl_hal_system_get_unique (void )

Get the unique number for this device.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Unique number for this device.


sl_hal_system_get_prod_rev#

uint8_t sl_hal_system_get_prod_rev (void )

Get the production revision for this part.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Production revision for this part.


sl_hal_system_get_sram_base_address#

uint32_t sl_hal_system_get_sram_base_address (void )

Get the SRAM Base Address.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Base address SRAM (32-bit unsigned integer).


sl_hal_system_get_sram_size#

uint16_t sl_hal_system_get_sram_size (void )

Get the SRAM size (in KB).

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves SRAM size by reading the chip device info structure. If your binary is made for one specific device only, use SRAM_SIZE instead.

Returns

  • Size of internal SRAM (in KB).


sl_hal_system_get_flash_size#

uint16_t sl_hal_system_get_flash_size (void )

Get the flash size (in KB).

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves flash size by reading the chip device info structure or DEVINFO->EMBMSIZE (embedded flash. not the case for S3 for now) or user config (external flash).

Returns

  • Size of flash (in KB).


sl_hal_system_get_flash_page_size#

uint32_t sl_hal_system_get_flash_page_size (void )

Get the flash page size in bytes.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function retrieves flash page size by reading the SE or user config (external flash)

Returns

  • Page size of flash in bytes.


sl_hal_system_get_part_number#

uint16_t sl_hal_system_get_part_number (void )

Get the MCU part number.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • The part number of MCU.


sl_hal_system_get_part_features#

sl_hal_system_features_t sl_hal_system_get_part_features (void )

Get the SoC or MCU features.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • The features of the current SoC or MCU.

Note

  • The features can be decoded by referring to the SoC or MCU datasheet.


sl_hal_system_get_temperature_info#

void sl_hal_system_get_temperature_info (sl_hal_system_devinfo_temperature_t * info)

Get the temperature information.

Parameters
TypeDirectionArgument NameDescription
sl_hal_system_devinfo_temperature_t *[out]info

Pointer to variable where to store the temperature info.


sl_hal_syscfg_read_chip_rev#

uint32_t sl_hal_syscfg_read_chip_rev (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_hal_syscfg_set_systicextclken_cfgsystic#

void sl_hal_syscfg_set_systicextclken_cfgsystic (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_hal_syscfg_clear_systicextclken_cfgsystic#

void sl_hal_syscfg_clear_systicextclken_cfgsystic (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_hal_system_fpu_set_access_mode#

void sl_hal_system_fpu_set_access_mode (sl_hal_system_fpu_access_t access_mode)

Set floating point co-processor (FPU) access mode.

Parameters
TypeDirectionArgument NameDescription
sl_hal_system_fpu_access_t[in]access_mode

Floating point co-processor access mode.


sl_hal_system_get_adc_calibration_info#

void sl_hal_system_get_adc_calibration_info (sl_hal_system_devinfo_adc_t * info)

Get the ADC calibration info.

Parameters
TypeDirectionArgument NameDescription
sl_hal_system_devinfo_adc_t *[out]info

Pointer to variable where to store the adc calibration info.


SYSTEM_GetDevinfoRev#

uint8_t SYSTEM_GetDevinfoRev (void )

Get DEVINFO revision.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Revision of the DEVINFO contents.


SYSTEM_FpuAccessModeSet#

void SYSTEM_FpuAccessModeSet (SYSTEM_FpuAccess_TypeDef accessMode)

Set floating point co-processor (FPU) access mode.

Parameters
TypeDirectionArgument NameDescription
SYSTEM_FpuAccess_TypeDef[in]accessMode

Floating point co-processor access mode. See SYSTEM_FpuAccess_TypeDef for details.