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 unique number for this device.
|
|
uint8_t | SYSTEM_GetProdRev (void) |
Get production revision for this part.
|
|
uint16_t | SYSTEM_GetSRAMSize (void) |
Get 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 part number of MCU.
|
|
SYSTEM_PartFamily_TypeDef | SYSTEM_GetFamily (void) |
Get family identifier of MCU.
|
|
uint8_t | SYSTEM_GetCalibrationTemperature (void) |
Get calibration temperature (in degrees Celsius).
|
|
Enumerations |
|
enum |
SYSTEM_PartFamily_TypeDef
{
systemPartFamilyMighty22 = DEVINFO_PART_FAMILY_MG | (22 << _DEVINFO_PART_FAMILYNUM_SHIFT), systemPartFamilyFlex22 = DEVINFO_PART_FAMILY_FG | (22 << _DEVINFO_PART_FAMILYNUM_SHIFT), systemPartFamilyBlue22 = DEVINFO_PART_FAMILY_BG | (22 << _DEVINFO_PART_FAMILYNUM_SHIFT), systemPartFamilyEfm32Pearl22 = DEVINFO_PART_FAMILY_PG | (22 << _DEVINFO_PART_FAMILYNUM_SHIFT), 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()
|
inline |
Get DEVINFO revision.
- Returns
- Revision of the DEVINFO contents.
◆ SYSTEM_FpuAccessModeSet()
|
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()
|
inline |
Get unique number for this device.
- Returns
- Unique number for this device.
◆ SYSTEM_GetProdRev()
|
inline |
Get production revision for this part.
- Returns
- Production revision for this part.
◆ SYSTEM_GetSRAMSize()
|
inline |
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).
◆ SYSTEM_GetFlashSize()
|
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()
|
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()
|
inline |
Get part number of MCU.
- Returns
- The part number of MCU.
◆ SYSTEM_GetFamily()
|
inline |
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.
◆ SYSTEM_GetCalibrationTemperature()
|
inline |
Get calibration temperature (in degrees Celsius).
- Returns
- Calibration temperature in Celsius.
Enumeration Type Documentation
◆ SYSTEM_PartFamily_TypeDef
Family identifiers.
◆ SYSTEM_SecurityCapability_TypeDef
Family security capability.