SYSTEM - System Utils

Description

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.

Data Structures

struct SYSTEM_ChipRevision_TypeDef
Chip revision details.
struct SYSTEM_CalAddrVal_TypeDef
DEVINFO calibration address/value pair.

Functions

void SYSTEM_ChipRevisionGet ( SYSTEM_ChipRevision_TypeDef *rev)
Get a chip major/minor revision.
bool SYSTEM_GetCalibrationValue (volatile uint32_t *regAddress)
Get a factory calibration value for a given peripheral register.
SYSTEM_SecurityCapability_TypeDef SYSTEM_GetSecurityCapability (void)
Get family security capability.
uint8_t SYSTEM_GetDevinfoRev (void)
Get DEVINFO revision.
void SYSTEM_FpuAccessModeSet ( SYSTEM_FpuAccess_TypeDef accessMode)
Set floating point co-processor (FPU) access mode.
uint64_t SYSTEM_GetUnique (void)
Get the unique number for this device.
uint8_t SYSTEM_GetProdRev (void)
Get the production revision for this part.
uint16_t SYSTEM_GetSRAMSize (void)
Get the SRAM size (in KB).
uint16_t SYSTEM_GetFlashSize (void)
Get the flash size (in KB).
uint32_t SYSTEM_GetFlashPageSize (void)
Get the flash page size in bytes.
uint16_t SYSTEM_GetPartNumber (void)
Get the MCU part number.
SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily (void)
Get the MCU family identifier.
uint8_t SYSTEM_GetCalibrationTemperature (void)
Get the calibration temperature (in degrees Celsius).

Enumerations

enum SYSTEM_PartFamily_TypeDef {
systemPartFamilyEfm32Gecko = _DEVINFO_PART_DEVICE_FAMILY_EFM32G,
systemPartFamilyEfm32Giant = _DEVINFO_PART_DEVICE_FAMILY_EFM32GG,
systemPartFamilyEfm32Giant11B = _DEVINFO_PART_DEVICE_FAMILY_EFM32GG11B,
systemPartFamilyEfm32Giant12B = _DEVINFO_PART_DEVICE_FAMILY_EFM32GG12B,
systemPartFamilyEfm32Tiny = _DEVINFO_PART_DEVICE_FAMILY_EFM32TG,
systemPartFamilyEfm32Tiny11B = _DEVINFO_PART_DEVICE_FAMILY_EFM32TG11B,
systemPartFamilyEfm32Leopard = _DEVINFO_PART_DEVICE_FAMILY_EFM32LG,
systemPartFamilyEfm32Wonder = _DEVINFO_PART_DEVICE_FAMILY_EFM32WG,
systemPartFamilyEfm32Zero = _DEVINFO_PART_DEVICE_FAMILY_EFM32ZG,
systemPartFamilyEfm32Happy = _DEVINFO_PART_DEVICE_FAMILY_EFM32HG,
systemPartFamilyEfm32Pearl1B = _DEVINFO_PART_DEVICE_FAMILY_EFM32PG1B,
systemPartFamilyEfm32Jade1B = _DEVINFO_PART_DEVICE_FAMILY_EFM32JG1B,
systemPartFamilyEfm32Pearl12B = _DEVINFO_PART_DEVICE_FAMILY_EFM32PG12B,
systemPartFamilyEfm32Jade12B = _DEVINFO_PART_DEVICE_FAMILY_EFM32JG12B,
systemPartFamilyEzr32Wonder = _DEVINFO_PART_DEVICE_FAMILY_EZR32WG,
systemPartFamilyEzr32Leopard = _DEVINFO_PART_DEVICE_FAMILY_EZR32LG,
systemPartFamilyEzr32Happy = _DEVINFO_PART_DEVICE_FAMILY_EZR32HG,
systemPartFamilyMighty1P = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG1P,
systemPartFamilyMighty1B = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG1B,
systemPartFamilyMighty1V = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG1V,
systemPartFamilyBlue1P = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG1P,
systemPartFamilyBlue1B = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG1B,
systemPartFamilyBlue1V = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG1V,
systemPartFamilyFlex1P = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG1P,
systemPartFamilyFlex1B = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG1B,
systemPartFamilyFlex1V = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG1V,
systemPartFamilyMighty12P = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG12P,
systemPartFamilyMighty12B = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG12B,
systemPartFamilyMighty12V = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG12V,
systemPartFamilyBlue12P = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG12P,
systemPartFamilyBlue12B = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG12B,
systemPartFamilyBlue12V = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG12V,
systemPartFamilyFlex12P = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG12P,
systemPartFamilyFlex12B = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG12B,
systemPartFamilyFlex12V = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG12V,
systemPartFamilyMighty13P = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG13P,
systemPartFamilyMighty13B = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG13B,
systemPartFamilyMighty13V = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG13V,
systemPartFamilyBlue13P = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG13P,
systemPartFamilyBlue13B = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG13B,
systemPartFamilyBlue13V = _DEVINFO_PART_DEVICE_FAMILY_EFR32BG13V,
systemPartFamilyFlex13P = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG13P,
systemPartFamilyFlex13B = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG13B,
systemPartFamilyFlex13V = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG13V,
systemPartFamilyZen13P = _DEVINFO_PART_DEVICE_FAMILY_EFR32ZG13P,
systemPartFamilyZen13L = _DEVINFO_PART_DEVICE_FAMILY_EFR32ZG13L,
systemPartFamilyZen13S = _DEVINFO_PART_DEVICE_FAMILY_EFR32ZG13S,
systemPartFamilyMighty14P = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG14P,
systemPartFamilyMighty14B = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG14B,
systemPartFamilyMighty14V = _DEVINFO_PART_DEVICE_FAMILY_EFR32MG14V,
systemPartFamilyFlex14P = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG14P,
systemPartFamilyFlex14B = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG14B,
systemPartFamilyFlex14V = _DEVINFO_PART_DEVICE_FAMILY_EFR32FG14V,
systemPartFamilyZen14P = _DEVINFO_PART_DEVICE_FAMILY_EFR32ZG14P,
systemPartFamilyGecko = _DEVINFO_PART_DEVICE_FAMILY_G,
systemPartFamilyGiant = _DEVINFO_PART_DEVICE_FAMILY_GG,
systemPartFamilyTiny = _DEVINFO_PART_DEVICE_FAMILY_TG,
systemPartFamilyLeopard = _DEVINFO_PART_DEVICE_FAMILY_LG,
systemPartFamilyWonder = _DEVINFO_PART_DEVICE_FAMILY_WG,
systemPartFamilyZero = _DEVINFO_PART_DEVICE_FAMILY_ZG,
systemPartFamilyHappy = _DEVINFO_PART_DEVICE_FAMILY_HG,
systemPartFamilyUnknown = 0xFF
}
Family identifiers.
enum SYSTEM_SecurityCapability_TypeDef {
securityCapabilityUnknown ,
securityCapabilityNA ,
securityCapabilityBasic ,
securityCapabilityRoT ,
securityCapabilitySE ,
securityCapabilityVault
}
Family security capability.
enum SYSTEM_FpuAccess_TypeDef {
fpuAccessDenied = (0x0 << 20),
fpuAccessPrivilegedOnly = (0x5 << 20),
fpuAccessReserved = (0xA << 20),
fpuAccessFull = (0xF << 20)
}
Floating point co-processor access modes.

Function Documentation

SYSTEM_ChipRevisionGet()

void SYSTEM_ChipRevisionGet ( SYSTEM_ChipRevision_TypeDef * rev )

Get a chip major/minor revision.

Parameters
[out] rev A location to place the chip revision information.

SYSTEM_GetCalibrationValue()

bool SYSTEM_GetCalibrationValue ( volatile uint32_t * regAddress )

Get a factory calibration value for a given peripheral register.

Parameters
[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.

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_GetDevinfoRev()

uint8_t SYSTEM_GetDevinfoRev ( void )
inline

Get DEVINFO revision.

Returns
Revision of the DEVINFO contents.

SYSTEM_FpuAccessModeSet()

void SYSTEM_FpuAccessModeSet ( SYSTEM_FpuAccess_TypeDef accessMode )
inline

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

Parameters
[in] accessMode Floating point co-processor access mode. See SYSTEM_FpuAccess_TypeDef for details.

SYSTEM_GetUnique()

uint64_t SYSTEM_GetUnique ( void )
inline

Get the unique number for this device.

Returns
Unique number for this device.

SYSTEM_GetProdRev()

uint8_t SYSTEM_GetProdRev ( void )
inline

Get the production revision for this part.

Returns
Production revision for this part.

SYSTEM_GetSRAMSize()

uint16_t SYSTEM_GetSRAMSize ( void )
inline

Get the SRAM size (in KB).

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 )
inline

Get the flash size (in KB).

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 )
inline

Get the flash page size in bytes.

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 )
inline

Get the MCU part number.

Returns
The part number of MCU.

SYSTEM_GetFamily()

SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily ( void )
inline

Get the MCU family identifier.

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.

SYSTEM_GetCalibrationTemperature()

uint8_t SYSTEM_GetCalibrationTemperature ( void )
inline

Get the calibration temperature (in degrees Celsius).

Returns
Calibration temperature in Celsius.

Enumeration Type Documentation

SYSTEM_PartFamily_TypeDef

Family identifiers.

Enumerator
systemPartFamilyEfm32Gecko

EFM32 Gecko Device Family.

systemPartFamilyEfm32Giant

EFM32 Giant Gecko Series 0 Device Family.

systemPartFamilyEfm32Giant11B

EFM32 Giant Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyEfm32Giant12B

EFM32 Giant Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyEfm32Tiny

EFM32 Tiny Gecko Device Family.

systemPartFamilyEfm32Tiny11B

EFM32 Tiny Gecko 11 Device Family.

systemPartFamilyEfm32Leopard

EFM32 Leopard Gecko Device Family.

systemPartFamilyEfm32Wonder

EFM32 Wonder Gecko Device Family.

systemPartFamilyEfm32Zero

EFM32 Zero Gecko Device Family.

systemPartFamilyEfm32Happy

EFM32 Happy Gecko Device Family.

systemPartFamilyEfm32Pearl1B

EFM32 Pearl Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyEfm32Jade1B

EFM32 Jade Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyEfm32Pearl12B

EFM32 Pearl Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyEfm32Jade12B

EFM32 Jade Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyEzr32Wonder

EZR32 Wonder Device Family.

systemPartFamilyEzr32Leopard

EZR32 Leopard Device Family.

systemPartFamilyEzr32Happy

EZR32 Happy Device Family.

systemPartFamilyMighty1P

EFR32 Mighty Gecko Series 1 Configuration 1 Premium Device Family.

systemPartFamilyMighty1B

EFR32 Mighty Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyMighty1V

EFR32 Mighty Gecko Series 1 Configuration 1 Value Device Family.

systemPartFamilyBlue1P

EFR32 Blue Gecko Series 1 Configuration 1 Premium Device Family.

systemPartFamilyBlue1B

EFR32 Blue Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyBlue1V

EFR32 Blue Gecko Series 1 Configuration 1 Value Device Family.

systemPartFamilyFlex1P

EFR32 Flex Gecko Series 1 Configuration 1 Premium Device Family.

systemPartFamilyFlex1B

EFR32 Flex Gecko Series 1 Configuration 1 Basic Device Family.

systemPartFamilyFlex1V

EFR32 Flex Gecko Series 1 Configuration 1 Value Device Family.

systemPartFamilyMighty12P

EFR32 Mighty Gecko Series 1 Configuration 2 Premium Device Family.

systemPartFamilyMighty12B

EFR32 Mighty Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyMighty12V

EFR32 Mighty Gecko Series 1 Configuration 2 Value Device Family.

systemPartFamilyBlue12P

EFR32 Blue Gecko Series 1 Configuration 2 Premium Device Family.

systemPartFamilyBlue12B

EFR32 Blue Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyBlue12V

EFR32 Blue Gecko Series 1 Configuration 2 Value Device Family.

systemPartFamilyFlex12P

EFR32 Flex Gecko Series 1 Configuration 2 Premium Device Family.

systemPartFamilyFlex12B

EFR32 Flex Gecko Series 1 Configuration 2 Basic Device Family.

systemPartFamilyFlex12V

EFR32 Flex Gecko Series 1 Configuration 2 Value Device Family.

systemPartFamilyMighty13P

EFR32 Mighty Gecko Series 1 Configuration 3 Premium Device Family.

systemPartFamilyMighty13B

EFR32 Mighty Gecko Series 1 Configuration 3 Basic Device Family.

systemPartFamilyMighty13V

EFR32 Mighty Gecko Series 1 Configuration 3 Value Device Family.

systemPartFamilyBlue13P

EFR32 Blue Gecko Series 1 Configuration 3 Premium Device Family.

systemPartFamilyBlue13B

EFR32 Blue Gecko Series 1 Configuration 3 Basic Device Family.

systemPartFamilyBlue13V

EFR32 Blue Gecko Series 1 Configuration 3 Value Device Family.

systemPartFamilyFlex13P

EFR32 Flex Gecko Series 1 Configuration 3 Premium Device Family.

systemPartFamilyFlex13B

EFR32 Flex Gecko Series 1 Configuration 3 Basic Device Family.

systemPartFamilyFlex13V

EFR32 Flex Gecko Series 1 Configuration 3 Value Device Family.

systemPartFamilyZen13P

EFR32 Zen Gecko Series 1 Configuration 3 Premium Device Family.

systemPartFamilyZen13L

EFR32 Zen Gecko Series 1 Configuration 3 Led Device Family.

systemPartFamilyZen13S

EFR32 Zen Gecko Series 1 Configuration 3 Sensor Device Family.

systemPartFamilyMighty14P

EFR32 Mighty Gecko Series 1 Configuration 4 Premium Device Family.

systemPartFamilyMighty14B

EFR32 Mighty Gecko Series 1 Configuration 4 Basic Device Family.

systemPartFamilyMighty14V

EFR32 Mighty Gecko Series 1 Configuration 4 Value Device Family.

systemPartFamilyFlex14P

EFR32 Flex Gecko Series 1 Configuration 4 Premium Device Family.

systemPartFamilyFlex14B

EFR32 Flex Gecko Series 1 Configuration 4 Basic Device Family.

systemPartFamilyFlex14V

EFR32 Flex Gecko Series 1 Configuration 4 Value Device Family.

systemPartFamilyZen14P

EFR32 Zen Gecko Series 1 Configuration 4 Premium Device Family.

systemPartFamilyGecko

Gecko Device Family.

systemPartFamilyGiant

Giant Gecko Device Family.

systemPartFamilyTiny

Tiny Gecko Device Family.

systemPartFamilyLeopard

Leopard Gecko Device Family.

systemPartFamilyWonder

Wonder Gecko Device Family.

systemPartFamilyZero

Zero Gecko Device Family.

systemPartFamilyHappy

Happy Gecko Device Family.

systemPartFamilyUnknown

Unknown Device Family.

Family ID is missing on unprogrammed parts.

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.

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.