SMU - Security Management Unit#
Security Management Unit (SMU) Peripheral API.
SMU forms the control and status/reporting component of bus-level security in EFM32/EFR32 devices.
Peripheral-level protection is provided via the Peripheral Protection Unit (PPU). PPU provides hardware access barrier to any peripheral that is configured to be protected. When an attempt is made to access a peripheral without the required privilege/security level, PPU detects the fault and intercepts the access. No write or read of the peripheral register space occurs, and an all-zero value is returned if the access is a read.
Modules#
Enumerations#
Functions#
Enable or disable PPU of SMU.
Initialize PPU of SMU.
Change access settings for a peripheral.
Get the ID of the peripheral that caused an access fault.
Clear one or more pending SMU interrupts.
Disable one or more SMU interrupts.
Enable one or more SMU interrupts.
Get pending SMU interrupts.
Get enabled and pending SMU interrupt flags.
Set one or more pending SMU interrupts from SW.
Macros#
Default SMU initialization structure settings.
Enumeration Documentation#
sl_hal_smu_peripheral_id_t#
sl_hal_smu_peripheral_id_t
SMU peripheral identifiers.
Enumerator | |
---|---|
SL_HAL_SMU_END | SMU peripheral end. |
Function Documentation#
sl_hal_smu_enable_ppu#
void sl_hal_smu_enable_ppu (bool enable)
Enable or disable PPU of SMU.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | [in] | enable | Set to true to enable PPU; set to false otherwise. |
sl_hal_smu_init#
void sl_hal_smu_init (const sl_hal_smu_init_t * init)
Initialize PPU of SMU.
Type | Direction | Argument Name | Description |
---|---|---|---|
const sl_hal_smu_init_t * | [in] | init | Pointer to initialization structure that defines which peripherals should only be accessed from privileged mode, and if PPU should be enabled. |
sl_hal_smu_set_privileged_access#
void sl_hal_smu_set_privileged_access (sl_hal_smu_peripheral_id_t peripheral, bool privileged)
Change access settings for a peripheral.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_hal_smu_peripheral_id_t | [in] | peripheral | ID of the peripheral to change access settings for. |
bool | [in] | privileged | Set to true if the peripheral should only be accessed from privileged mode; set to false otherwise. |
Set to limit access of a peripheral from privileged mode.
sl_hal_smu_get_faulting_peripheral#
sl_hal_smu_peripheral_id_t sl_hal_smu_get_faulting_peripheral (void )
Get the ID of the peripheral that caused an access fault.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Note
The return value is only valid if SMU_IF_PPUPRIV interrupt flag is set.
Returns
ID of the peripheral that caused an access fault.
sl_hal_smu_int_clear#
void sl_hal_smu_int_clear (uint32_t flags)
Clear one or more pending SMU interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | Bitwise logic OR of SMU interrupt sources to clear. |
sl_hal_smu_int_disable#
void sl_hal_smu_int_disable (uint32_t flags)
Disable one or more SMU interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | SMU interrupt sources to disable. |
sl_hal_smu_int_enable#
void sl_hal_smu_int_enable (uint32_t flags)
Enable one or more SMU interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | SMU interrupt sources to enable. |
Note
Depending on the use, a pending interrupt may already be set prior to enabling the interrupt. To ignore a pending interrupt, consider using SMU_IntClear() prior to enabling the interrupt.
sl_hal_smu_int_get#
uint32_t sl_hal_smu_int_get (void )
Get pending SMU interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
SMU interrupt sources pending.
sl_hal_smu_int_get_enabled#
uint32_t sl_hal_smu_int_get_enabled (void )
Get enabled and pending SMU interrupt flags.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Note
Interrupt flags are not cleared by this function.
Returns
Pending and enabled SMU interrupt sources. The return value is the bitwise AND combination of
the OR combination of enabled interrupt sources in SMU_IEN register and
the OR combination of valid interrupt flags in SMU_IF register.
sl_hal_smu_int_set#
void sl_hal_smu_int_set (uint32_t flags)
Set one or more pending SMU interrupts from SW.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | SMU interrupt sources to set to pending. |