SYSTEM

Detailed 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_CalAddrVal_TypeDef
struct SYSTEM_ChipRevision_TypeDef

Enumerations

enum SYSTEM_PartFamily_TypeDef {
systemPartFamilyEfm32Gecko = _DEVINFO_PART_DEVICE_FAMILY_EFM32G,
systemPartFamilyEfm32Giant = _DEVINFO_PART_DEVICE_FAMILY_EFM32GG,
systemPartFamilyEfm32Tiny = _DEVINFO_PART_DEVICE_FAMILY_EFM32TG,
systemPartFamilyEfm32Leopard = _DEVINFO_PART_DEVICE_FAMILY_EFM32LG,
systemPartFamilyEfm32Wonder = _DEVINFO_PART_DEVICE_FAMILY_EFM32WG,
systemPartFamilyEfm32Zero = _DEVINFO_PART_DEVICE_FAMILY_EFM32ZG,
systemPartFamilyEfm32Happy = _DEVINFO_PART_DEVICE_FAMILY_EFM32HG,
systemPartFamilyEzr32Wonder = _DEVINFO_PART_DEVICE_FAMILY_EZR32WG,
systemPartFamilyEzr32Leopard = _DEVINFO_PART_DEVICE_FAMILY_EZR32LG,
systemPartFamilyEzr32Happy = _DEVINFO_PART_DEVICE_FAMILY_EZR32HG,
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
}

Functions

void SYSTEM_ChipRevisionGet ( SYSTEM_ChipRevision_TypeDef *rev)
Get a chip major/minor revision.
__STATIC_INLINE uint8_t SYSTEM_GetCalibrationTemperature (void)
Get calibration temperature (in degrees Celsius).
bool SYSTEM_GetCalibrationValue (volatile uint32_t *regAddress)
Get a factory calibration value for a given peripheral register.
__STATIC_INLINE SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily (void)
Get family identifier of MCU.
__STATIC_INLINE uint32_t SYSTEM_GetFlashPageSize (void)
Get the flash page size in bytes.
__STATIC_INLINE uint16_t SYSTEM_GetFlashSize (void)
Get the flash size (in KB).
__STATIC_INLINE uint16_t SYSTEM_GetPartNumber (void)
Get part number of MCU.
__STATIC_INLINE uint8_t SYSTEM_GetProdRev (void)
Get production revision for this part.
__STATIC_INLINE uint16_t SYSTEM_GetSRAMSize (void)
Get SRAM size (in KB).
__STATIC_INLINE uint64_t SYSTEM_GetUnique (void)
Get unique number for this device.

Enumeration Type Documentation

Family identifiers.

Enumerator
systemPartFamilyEfm32Gecko

EFM32 Gecko Device Family.

systemPartFamilyEfm32Giant

EFM32 Giant Gecko Series 0 Device Family.

systemPartFamilyEfm32Tiny

EFM32 Tiny Gecko 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.

systemPartFamilyEzr32Wonder

EZR32 Wonder Device Family.

systemPartFamilyEzr32Leopard

EZR32 Leopard Device Family.

systemPartFamilyEzr32Happy

EZR32 Happy 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.

Definition at line 62 of file em_system.h .

Function Documentation

void SYSTEM_ChipRevisionGet ( SYSTEM_ChipRevision_TypeDef * rev )

Get a chip major/minor revision.

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

Definition at line 56 of file em_system.c .

References SYSTEM_ChipRevision_TypeDef::family , SYSTEM_ChipRevision_TypeDef::major , and SYSTEM_ChipRevision_TypeDef::minor .

Referenced by CHIP_Init() , and USBD_Init() .

__STATIC_INLINE uint8_t SYSTEM_GetCalibrationTemperature ( void )

Get calibration temperature (in degrees Celsius).

Returns
Calibration temperature in Celsius.

Definition at line 538 of file em_system.h .

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.

Definition at line 106 of file em_system.c .

References SYSTEM_CalAddrVal_TypeDef::address , and SYSTEM_CalAddrVal_TypeDef::calValue .

Referenced by OPAMP_Enable() .

__STATIC_INLINE SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily ( void )

Get 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).
Returns
Family identifier of MCU.

Definition at line 516 of file em_system.h .

__STATIC_INLINE uint32_t SYSTEM_GetFlashPageSize ( void )

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.

Definition at line 450 of file em_system.h .

References SYSTEM_GetProdRev() .

__STATIC_INLINE uint16_t SYSTEM_GetFlashSize ( void )

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

Definition at line 425 of file em_system.h .

References SYSTEM_GetProdRev() .

__STATIC_INLINE uint16_t SYSTEM_GetPartNumber ( void )

Get part number of MCU.

Returns
The part number of MCU.

Definition at line 489 of file em_system.h .

__STATIC_INLINE uint8_t SYSTEM_GetProdRev ( void )

Get production revision for this part.

Returns
Production revision for this part.

Definition at line 367 of file em_system.h .

Referenced by CHIP_Init() , SYSTEM_GetFlashPageSize() , SYSTEM_GetFlashSize() , and SYSTEM_GetSRAMSize() .

__STATIC_INLINE uint16_t SYSTEM_GetSRAMSize ( void )

Get 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).

Definition at line 392 of file em_system.h .

References SYSTEM_GetProdRev() .

__STATIC_INLINE uint64_t SYSTEM_GetUnique ( void )

Get unique number for this device.

Returns
Unique number for this device.

Definition at line 347 of file em_system.h .