EFM32 Happy Gecko Software Documentation
efm32hg-doc-5.1.2
|
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 the DEVINFO and SCB blocks. Functions to configure and read status from the 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 chip major/minor revision. More... | |
__STATIC_INLINE uint8_t | SYSTEM_GetCalibrationTemperature (void) |
Get the calibration temperature (in degrees Celsius). More... | |
bool | SYSTEM_GetCalibrationValue (volatile uint32_t *regAddress) |
Get factory calibration value for a given peripheral register. More... | |
__STATIC_INLINE SYSTEM_PartFamily_TypeDef | SYSTEM_GetFamily (void) |
Get family identifier of the MCU. More... | |
__STATIC_INLINE uint32_t | SYSTEM_GetFlashPageSize (void) |
Get the flash page size in bytes. More... | |
__STATIC_INLINE uint16_t | SYSTEM_GetFlashSize (void) |
Get the flash size (in KB). More... | |
__STATIC_INLINE uint16_t | SYSTEM_GetPartNumber (void) |
Get part number of the MCU. 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 uint64_t | SYSTEM_GetUnique (void) |
Get the unique number for this device. More... | |
Family identifiers.
Definition at line 64 of file em_system.h.
void SYSTEM_ChipRevisionGet | ( | SYSTEM_ChipRevision_TypeDef * | rev | ) |
Get chip major/minor revision.
[out] | rev | Location to place chip revision info. |
Definition at line 58 of file em_system.c.
References _ROMTABLE_PID0_FAMILYLSB_MASK, _ROMTABLE_PID0_FAMILYLSB_SHIFT, _ROMTABLE_PID0_REVMAJOR_MASK, _ROMTABLE_PID0_REVMAJOR_SHIFT, _ROMTABLE_PID1_FAMILYMSB_MASK, _ROMTABLE_PID1_FAMILYMSB_SHIFT, _ROMTABLE_PID2_REVMINORMSB_MASK, _ROMTABLE_PID2_REVMINORMSB_SHIFT, _ROMTABLE_PID3_REVMINORLSB_MASK, _ROMTABLE_PID3_REVMINORLSB_SHIFT, SYSTEM_ChipRevision_TypeDef::family, SYSTEM_ChipRevision_TypeDef::major, SYSTEM_ChipRevision_TypeDef::minor, and ROMTABLE.
Referenced by CHIP_Init(), and USBD_Init().
__STATIC_INLINE uint8_t SYSTEM_GetCalibrationTemperature | ( | void | ) |
Get the calibration temperature (in degrees Celsius).
Definition at line 466 of file em_system.h.
References _DEVINFO_CAL_TEMP_MASK, _DEVINFO_CAL_TEMP_SHIFT, and DEVINFO.
bool SYSTEM_GetCalibrationValue | ( | volatile uint32_t * | regAddress | ) |
Get factory calibration value for a given peripheral register.
[in] | regAddress | Peripheral calibration register address to get calibration value for. If a calibration value is found then this register is updated with the calibration value. |
Definition at line 93 of file em_system.c.
References SYSTEM_CalAddrVal_TypeDef::address, SYSTEM_CalAddrVal_TypeDef::calValue, and DEVINFO_BASE.
__STATIC_INLINE SYSTEM_PartFamily_TypeDef SYSTEM_GetFamily | ( | void | ) |
Get family identifier of the MCU.
Definition at line 451 of file em_system.h.
References _DEVINFO_PART_DEVICE_FAMILY_MASK, _DEVINFO_PART_DEVICE_FAMILY_SHIFT, and DEVINFO.
__STATIC_INLINE uint32_t SYSTEM_GetFlashPageSize | ( | void | ) |
Get the flash page size in bytes.
Definition at line 383 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_GetFlashSize | ( | void | ) |
Get the flash size (in KB).
Definition at line 356 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_GetPartNumber | ( | void | ) |
Get part number of the MCU.
Definition at line 431 of file em_system.h.
References _DEVINFO_PART_DEVICE_NUMBER_MASK, _DEVINFO_PART_DEVICE_NUMBER_SHIFT, and DEVINFO.
__STATIC_INLINE uint8_t SYSTEM_GetProdRev | ( | void | ) |
Get the production revision for this part.
Definition at line 303 of file em_system.h.
References _DEVINFO_PART_PROD_REV_MASK, _DEVINFO_PART_PROD_REV_SHIFT, and DEVINFO.
Referenced by CHIP_Init(), SYSTEM_GetFlashPageSize(), SYSTEM_GetFlashSize(), and SYSTEM_GetSRAMSize().
__STATIC_INLINE uint16_t SYSTEM_GetSRAMSize | ( | void | ) |
Get the SRAM size (in KB).
Definition at line 321 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 uint64_t SYSTEM_GetUnique | ( | void | ) |
Get the unique number for this device.
Definition at line 290 of file em_system.h.
References DEVINFO.