CRACEN HAL
- group nrf_cracen_hal
Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) peripheral.
Defines
-
NRF_CRACEN_SEED_COUNT
Number of seed words for private key generation.
Enums
-
enum nrf_cracen_event_t
CRACEN events.
Values:
-
enumerator NRF_CRACEN_EVENT_CRYPTOMASTER
Interrupt triggered at Cryptomaster.
-
enumerator NRF_CRACEN_EVENT_RNG
Interrupt triggered at RNG.
-
enumerator NRF_CRACEN_EVENT_PKE_IKG
Interrupt triggered at PKE or IKG.
-
enumerator NRF_CRACEN_EVENT_CRYPTOMASTER
Functions
-
NRF_STATIC_INLINE uint32_t nrf_cracen_event_address_get(NRF_CRACEN_Type const *p_reg, nrf_cracen_event_t event)
Function for getting the address of the specified CRACEN event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] CRACEN event.
- Returns:
Address of the specified event register.
-
NRF_STATIC_INLINE void nrf_cracen_event_clear(NRF_CRACEN_Type *p_reg, nrf_cracen_event_t event)
Function for clearing the specified CRACEN event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] CRACEN event to be cleared.
-
NRF_STATIC_INLINE bool nrf_cracen_event_check(NRF_CRACEN_Type const *p_reg, nrf_cracen_event_t event)
Function for checking the state of the specified CRACEN event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] CRACEN event to be checked.
- Return values:
true – The event has been generated.
false – The event has not been generated.
-
NRF_STATIC_INLINE void nrf_cracen_int_enable(NRF_CRACEN_Type *p_reg, uint32_t mask)
Function for enabling the specified interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be enabled. Use nrf_cracen_int_mask_t values for bit masking.
-
NRF_STATIC_INLINE uint32_t nrf_cracen_int_enable_check(NRF_CRACEN_Type const *p_reg, uint32_t mask)
Function for checking if the specified interrupts are enabled.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be checked. Use nrf_cracen_int_mask_t values for bit masking.
- Returns:
Mask of enabled interrupts.
-
NRF_STATIC_INLINE void nrf_cracen_int_disable(NRF_CRACEN_Type *p_reg, uint32_t mask)
Function for disabling the specified interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be disabled. Use nrf_cracen_int_mask_t values for bit masking.
-
NRF_STATIC_INLINE void nrf_cracen_module_enable(NRF_CRACEN_Type *p_reg, uint32_t modules)
Function for enabling CRACEN modules.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
modules – [in] Mask of modules to be enabled. See nrf_cracen_module_mask_t.
-
NRF_STATIC_INLINE void nrf_cracen_module_disable(NRF_CRACEN_Type *p_reg, uint32_t modules)
Function for disabling CRACEN modules.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
modules – [in] Mask of modules to be disabled. See nrf_cracen_module_mask_t.
-
NRF_STATIC_INLINE uint32_t nrf_cracen_module_get(NRF_CRACEN_Type const *p_reg)
Function for getting enabled CRACEN modules.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Mask of enabled modules. See nrf_cracen_module_mask_t.
-
NRF_STATIC_INLINE void nrf_cracen_seedram_lock_enable_set(NRF_CRACEN_Type *p_reg, bool enable)
Function for enabling or disabling lock on access to the RAM used for the seed.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
enable – [in] True if lock is to be enabled, false otherwise.
-
NRF_STATIC_INLINE bool nrf_cracen_seedram_lock_check(NRF_CRACEN_Type const *p_reg)
Function for checking if access to the RAM used for the seed is locked.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values:
true – Access to the RAM used for the seed is locked.
false – Access to the RAM used for the seed is unlocked.
-
NRF_STATIC_INLINE void nrf_cracen_seed_set(NRF_CRACEN_Type *p_reg, uint8_t idx, uint32_t value)
Function for setting specified seed word for private key generation.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
idx – [in] Index of the seed word.
value – [in] Seed value to be set.
-
NRF_CRACEN_SEED_COUNT