EFM32 Gecko Software Documentation  efm32g-doc-4.2.1

System Peripheral API

. More...

Data Structures

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

Detailed Description

Enumeration Type Documentation

Family identifiers.

Enumerator
systemPartFamilyEfm32Gecko 

EFM32 Gecko Device Family

systemPartFamilyEfm32Giant 

EFM32 Giant Gecko 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. The family id is missing on unprogrammed parts.

Definition at line 58 of file em_system.h.

Function Documentation

uint32_t SYSTEM_GetCalibrationValue ( volatile uint32_t *  regAddress)
Parameters
[in]regAddressAddress of register to get a calibration value for.
Returns
Calibration value for the requested register.

Definition at line 92 of file em_system.c.

References CALIBRATE_TypeDef::ADDRESS, CALIBRATE, CALIBRATE_MAX_REGISTERS, and CALIBRATE_TypeDef::VALUE.

__STATIC_INLINE uint64_t SYSTEM_GetUnique ( void  )
Returns
Unique number for this part.

Definition at line 213 of file em_system.h.

References DEVINFO.

__STATIC_INLINE uint8_t SYSTEM_GetProdRev ( void  )
Returns
Production revision for this part.

Definition at line 225 of file em_system.h.

References _DEVINFO_PART_PROD_REV_MASK, _DEVINFO_PART_PROD_REV_SHIFT, and DEVINFO.

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

__STATIC_INLINE uint16_t SYSTEM_GetSRAMSize ( void  )
Note
This function retrievs the correct value by reading the chip device info structure. If your binary is made for one specific device only, the #define SRAM_SIZE can be used instead.
Returns
The size of the internal SRAM (in KB).

Definition at line 243 of file em_system.h.

References _DEVINFO_MSIZE_FLASH_MASK, _DEVINFO_MSIZE_FLASH_SHIFT, _DEVINFO_MSIZE_SRAM_MASK, _DEVINFO_MSIZE_SRAM_SHIFT, DEVINFO, and SYSTEM_GetProdRev().

__STATIC_INLINE uint16_t SYSTEM_GetFlashSize ( void  )
Note
This function retrievs the correct value by reading the chip device info structure. If your binary is made for one specific device only, the #define FLASH_SIZE can be used instead.
Returns
The size of the internal flash (in KB).

Definition at line 269 of file em_system.h.

References _DEVINFO_MSIZE_FLASH_MASK, _DEVINFO_MSIZE_FLASH_SHIFT, _DEVINFO_MSIZE_SRAM_MASK, _DEVINFO_MSIZE_SRAM_SHIFT, DEVINFO, and SYSTEM_GetProdRev().

__STATIC_INLINE uint32_t SYSTEM_GetFlashPageSize ( void  )
Note
This function retrievs the correct value by reading the chip device info structure. If your binary is made for one specific device only, the #define FLASH_PAGE_SIZE can be used instead.
Returns
The page size of the internal flash in bytes.

Definition at line 296 of file em_system.h.

References _DEVINFO_MEMINFO_FLASH_PAGE_SIZE_MASK, _DEVINFO_MEMINFO_FLASH_PAGE_SIZE_SHIFT, DEVINFO, FLASH_PAGE_SIZE, and SYSTEM_GetProdRev().

__STATIC_INLINE uint16_t SYSTEM_GetPartNumber ( void  )
Returns
The part number of the MCU.

Definition at line 344 of file em_system.h.

References _DEVINFO_PART_DEVICE_NUMBER_MASK, _DEVINFO_PART_DEVICE_NUMBER_SHIFT, and DEVINFO.

__STATIC_INLINE SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily ( void  )
Note
This function retrievs the family id by reading the chip's device info structure in flash memory. The user can retrieve the family id directly by reading the DEVINFO->PART item and decode with the mask and shift #defines defined in <part_family>_devinfo.h (please refer to code below for details).
Returns
The family identifier of the MCU.

Definition at line 364 of file em_system.h.

References _DEVINFO_PART_DEVICE_FAMILY_MASK, _DEVINFO_PART_DEVICE_FAMILY_SHIFT, and DEVINFO.

__STATIC_INLINE uint8_t SYSTEM_GetCalibrationTemperature ( void  )
Returns
The calibration temperature in Celsius.

Definition at line 379 of file em_system.h.

References _DEVINFO_CAL_TEMP_MASK, _DEVINFO_CAL_TEMP_SHIFT, and DEVINFO.