Hardware access layer for managing the Key Management Unit (KMU) peripheral.
More...
Hardware access layer for managing the Key Management Unit (KMU) peripheral.
KMU events.
Enumerator |
---|
NRF_KMU_EVENT_KEYSLOT_PUSHED |
Key successfully pushed over secure APB.
|
NRF_KMU_EVENT_KEYSLOT_REVOKED |
Key has been revoked and cannot be tasked for selection.
|
NRF_KMU_EVENT_KEYSLOT_ERROR |
No key slot selected or no destination address defined or error during push mechanism.
|
KMU interrupts.
Enumerator |
---|
NRF_KMU_INT_PUSHED_MASK |
Interrupt on KEYSLOT_PUSHED event.
|
NRF_KMU_INT_REVOKED_MASK |
Interrupt on KEYSLOT_REVOKED event.
|
NRF_KMU_INT_ERROR_MASK |
Interrupt on KEYSLOT_ERROR event.
|
KMU operation status.
Enumerator |
---|
NRF_KMU_STATUS_BLOCKED_MASK |
Access violation detected and blocked.
|
NRF_KMU_STATUS_SELECTED_MASK |
Key slot ID successfully selected by KMU.
|
KMU tasks.
Enumerator |
---|
NRF_KMU_TASK_PUSH_KEYSLOT |
Push a key slot over secure APB.
|
__STATIC_INLINE uint32_t nrf_kmu_event_address_get |
( |
NRF_KMU_Type const * |
p_reg, |
|
|
nrf_kmu_event_t |
event |
|
) |
| |
Function for getting the address of a specific KMU event register.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Requested event. |
- Returns
- Address of the specified event register.
__STATIC_INLINE bool nrf_kmu_event_check |
( |
NRF_KMU_Type const * |
p_reg, |
|
|
nrf_kmu_event_t |
event |
|
) |
| |
Function for checking the state of a specific KMU event.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Event to check. |
- Return values
-
true | If the event is set. |
false | If the event is not set. |
__STATIC_INLINE void nrf_kmu_event_clear |
( |
NRF_KMU_Type * |
p_reg, |
|
|
nrf_kmu_event_t |
event |
|
) |
| |
Function for clearing a specific KMU event.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Event to clear. |
__STATIC_INLINE void nrf_kmu_int_disable |
( |
NRF_KMU_Type * |
p_reg, |
|
|
uint32_t |
mask |
|
) |
| |
Function for disabling specified interrupts.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | mask | Interrupts to disable. |
__STATIC_INLINE void nrf_kmu_int_enable |
( |
NRF_KMU_Type * |
p_reg, |
|
|
uint32_t |
mask |
|
) |
| |
Function for enabling specified interrupts.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | mask | Interrupts to enable. |
__STATIC_INLINE bool nrf_kmu_int_enable_check |
( |
NRF_KMU_Type const * |
p_reg, |
|
|
nrf_kmu_int_mask_t |
kmu_int |
|
) |
| |
Function for retrieving the state of a given interrupt.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | kmu_int | Interrupt to check. |
- Return values
-
true | If the interrupt is enabled. |
false | If the interrupt is not enabled. |
__STATIC_INLINE uint32_t nrf_kmu_intpend_get |
( |
NRF_KMU_Type const * |
p_reg | ) |
|
Function for retrieving the state of interrupts.
Function returns bitmask. Please use nrf_kmu_int_mask_t to check interrupts status.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
- Returns
- Bitmask with pending interrupts bits.
__STATIC_INLINE uint8_t nrf_kmu_keyslot_get |
( |
NRF_KMU_Type const * |
p_reg | ) |
|
Function for getting the key slot ID.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
- Returns
- Key slot ID.
__STATIC_INLINE void nrf_kmu_keyslot_set |
( |
NRF_KMU_Type * |
p_reg, |
|
|
uint8_t |
keyslot_id |
|
) |
| |
Function for selecting the key slot ID.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | keyslot_id | Key slot ID to be read over AHB or pushed over secure APB when TASKS_PUSH_KEYSLOT is started. |
__STATIC_INLINE uint32_t nrf_kmu_status_get |
( |
NRF_KMU_Type const * |
p_reg | ) |
|
Function for getting status bits of the KMU operation.
Function returns bitmask. Please use nrf_kmu_status_t to check operations status.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
- Returns
- Bitmask with operation status bits.
__STATIC_INLINE uint32_t nrf_kmu_task_address_get |
( |
NRF_KMU_Type const * |
p_reg, |
|
|
nrf_kmu_task_t |
task |
|
) |
| |
Function for getting the address of a specific KMU task register.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | task | Requested task. |
- Returns
- Address of the specified task register.
__STATIC_INLINE void nrf_kmu_task_trigger |
( |
NRF_KMU_Type * |
p_reg, |
|
|
nrf_kmu_task_t |
task |
|
) |
| |
Function for activating a specific KMU task.
- Parameters
-
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | task | Task to activate. |