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#

sl_hal_smu_privileged_t

sl_hal_smu_init_t

Enumerations#

enum
SL_HAL_SMU_END
}

SMU peripheral identifiers.

Functions#

void

Enable or disable PPU of SMU.

void
sl_hal_smu_init(const sl_hal_smu_init_t *init)

Initialize PPU of SMU.

void
sl_hal_smu_set_privileged_access(sl_hal_smu_peripheral_id_t peripheral, bool privileged)

Change access settings for a peripheral.

Get the ID of the peripheral that caused an access fault.

void
sl_hal_smu_int_clear(uint32_t flags)

Clear one or more pending SMU interrupts.

void
sl_hal_smu_int_disable(uint32_t flags)

Disable one or more SMU interrupts.

void
sl_hal_smu_int_enable(uint32_t flags)

Enable one or more SMU interrupts.

uint32_t

Get pending SMU interrupts.

uint32_t

Get enabled and pending SMU interrupt flags.

void
sl_hal_smu_int_set(uint32_t flags)

Set one or more pending SMU interrupts from SW.

Macros#

#define
SMU_INIT_DEFAULT undefined

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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
voidN/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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
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.

Parameters
TypeDirectionArgument NameDescription
voidN/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.

Parameters
TypeDirectionArgument NameDescription
voidN/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.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]flags

SMU interrupt sources to set to pending.