nrfx 4.5.0
Loading...
Searching...
No Matches
CRACEN CryptoMaster HAL

Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) CryptoMaster (CM) peripheral. More...

Enumerations

enum  nrf_cracen_cm_config_indirect_mask_t {
  NRF_CRACEN_CM_CONFIG_INDIRECT_FETCH_MASK = CRACENCORE_CRYPTMSTRDMA_CONFIG_FETCHCTRLINDIRECT_Msk ,
  NRF_CRACEN_CM_CONFIG_INDIRECT_PUSH_MASK = CRACENCORE_CRYPTMSTRDMA_CONFIG_PUSHCTRLINDIRECT_Msk
}
 CRACEN CryptoMaster configuration indirect mask. More...
 
enum  nrf_cracen_cm_int_mask_t {
  NRF_CRACEN_CM_INT_FETCH_BLOCK_END_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_FETCHERBLOCKEND_Msk ,
  NRF_CRACEN_CM_INT_FETCH_STOPPED_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_FETCHERSTOPPED_Msk ,
  NRF_CRACEN_CM_INT_FETCH_ERROR_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_FETCHERERROR_Msk ,
  NRF_CRACEN_CM_INT_PUSH_BLOCK_END_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_PUSHERBLOCKEND_Msk ,
  NRF_CRACEN_CM_INT_PUSH_STOPPED_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_PUSHERSTOPPED_Msk ,
  NRF_CRACEN_CM_INT_PUSH_ERROR_MASK = CRACENCORE_CRYPTMSTRDMA_INTEN_PUSHERERROR_Msk
}
 CRACEN CryptoMaster interrupts' masks. More...
 
enum  nrf_cracen_cm_status_mask_t {
  NRF_CRACEN_CM_STATUS_BUSY_FETCH_MASK = CRACENCORE_CRYPTMSTRDMA_STATUS_FETCHBUSY_Msk ,
  NRF_CRACEN_CM_STATUS_BUSY_PUSH_MASK = CRACENCORE_CRYPTMSTRDMA_STATUS_PUSHBUSY_Msk ,
  NRF_CRACEN_CM_STATUS_FETCH_NOT_EMPTY_MASK = CRACENCORE_CRYPTMSTRDMA_STATUS_FETCHNOTEMPTY_Msk ,
  NRF_CRACEN_CM_STATUS_PUSH_WAITING_MASK = CRACENCORE_CRYPTMSTRDMA_STATUS_PUSHWAITINGFIFO_Msk ,
  NRF_CRACEN_CM_STATUS_SOFTRESET_BUSY_MASK = CRACENCORE_CRYPTMSTRDMA_STATUS_SOFTRSTBUSY_Msk
}
 CRACEN CryptoMaster status busy mask. More...
 

Functions

NRF_STATIC_INLINE void nrf_cracen_cm_fetch_addr_set (NRF_CRACENCORE_Type *p_reg, void const *p_buffer)
 Function for setting the DMA fetch pointer to either the buffer from which the DMA will read data (in direct mode), or a pointer to a DMA descriptor (in scatter mode).
 
NRF_STATIC_INLINE void nrf_cracen_cm_push_addr_set (NRF_CRACENCORE_Type *p_reg, void const *p_buffer)
 Function for setting the DMA push pointer to either the buffer into which the DMA will write data (in direct mode), or a pointer to a DMA descriptor (in scatter mode).
 
NRF_STATIC_INLINE void nrf_cracen_cm_config_indirect_set (NRF_CRACENCORE_Type *p_reg, nrf_cracen_cm_config_indirect_mask_t mask)
 Function for setting the DMA's indirect configuration.
 
NRF_STATIC_INLINE void nrf_cracen_cm_softreset (NRF_CRACENCORE_Type *p_reg)
 Function for soft resetting the CryptoMaster module.
 
NRF_STATIC_INLINE void nrf_cracen_cm_start (NRF_CRACENCORE_Type *p_reg)
 Function for starting the CryptoMaster.
 
NRF_STATIC_INLINE void nrf_cracen_cm_int_enable (NRF_CRACENCORE_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupts.
 
NRF_STATIC_INLINE void nrf_cracen_cm_int_disable (NRF_CRACENCORE_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_cracen_cm_int_enable_check (NRF_CRACENCORE_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE void nrf_cracen_cm_int_clear (NRF_CRACENCORE_Type *p_reg, uint32_t mask)
 Function for clearing the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_cracen_cm_int_pending_get (NRF_CRACENCORE_Type const *p_reg)
 Function for getting the state of pending interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_cracen_cm_status_get (NRF_CRACENCORE_Type const *p_reg, uint32_t mask)
 Function for getting the status of the CryptoMaster.
 

Detailed Description

Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) CryptoMaster (CM) peripheral.

Enumeration Type Documentation

◆ nrf_cracen_cm_config_indirect_mask_t

CRACEN CryptoMaster configuration indirect mask.

Enumerator
NRF_CRACEN_CM_CONFIG_INDIRECT_FETCH_MASK 

Set the fetch DMA in scatter/gather mode.

NRF_CRACEN_CM_CONFIG_INDIRECT_PUSH_MASK 

Set the push DMA in scatter/gather mode.

◆ nrf_cracen_cm_int_mask_t

CRACEN CryptoMaster interrupts' masks.

Enumerator
NRF_CRACEN_CM_INT_FETCH_BLOCK_END_MASK 

Interrupt on DMA fetch end of block (if enabled in the descriptor, for indirect mode only).

NRF_CRACEN_CM_INT_FETCH_STOPPED_MASK 

Interrupt on DMA fetch stopped/ended.

NRF_CRACEN_CM_INT_FETCH_ERROR_MASK 

Interrupt on DMA fetch bus error.

NRF_CRACEN_CM_INT_PUSH_BLOCK_END_MASK 

Interrupt on DMA push end of block (if enabled in the descriptor, for indirect mode only).

NRF_CRACEN_CM_INT_PUSH_STOPPED_MASK 

Interrupt on DMA push stopped/ended.

NRF_CRACEN_CM_INT_PUSH_ERROR_MASK 

Interrupt on DMA push bus error.

◆ nrf_cracen_cm_status_mask_t

CRACEN CryptoMaster status busy mask.

Enumerator
NRF_CRACEN_CM_STATUS_BUSY_FETCH_MASK 

Fetch DMA is busy.

NRF_CRACEN_CM_STATUS_BUSY_PUSH_MASK 

Push DMA is busy.

NRF_CRACEN_CM_STATUS_FETCH_NOT_EMPTY_MASK 

Fetch DMA FIFO is not empty.

NRF_CRACEN_CM_STATUS_PUSH_WAITING_MASK 

Push DMA is waiting for data from a crypto engine.

NRF_CRACEN_CM_STATUS_SOFTRESET_BUSY_MASK 

Soft-resetting.

Function Documentation

◆ nrf_cracen_cm_config_indirect_set()

NRF_STATIC_INLINE void nrf_cracen_cm_config_indirect_set ( NRF_CRACENCORE_Type * p_reg,
nrf_cracen_cm_config_indirect_mask_t mask )

Function for setting the DMA's indirect configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask selecting if the push and/or fetch DMA should be in indirect mode. Use nrf_cracen_cm_config_indirect_mask_t for bit masking.

◆ nrf_cracen_cm_fetch_addr_set()

NRF_STATIC_INLINE void nrf_cracen_cm_fetch_addr_set ( NRF_CRACENCORE_Type * p_reg,
void const * p_buffer )

Function for setting the DMA fetch pointer to either the buffer from which the DMA will read data (in direct mode), or a pointer to a DMA descriptor (in scatter mode).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the data to read, or a read descriptor.

◆ nrf_cracen_cm_int_clear()

NRF_STATIC_INLINE void nrf_cracen_cm_int_clear ( NRF_CRACENCORE_Type * p_reg,
uint32_t mask )

Function for clearing the specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be cleared. Use nrf_cracen_cm_int_mask_t values for bit masking.

◆ nrf_cracen_cm_int_disable()

NRF_STATIC_INLINE void nrf_cracen_cm_int_disable ( NRF_CRACENCORE_Type * p_reg,
uint32_t mask )

Function for disabling the specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_cracen_cm_int_mask_t values for bit masking.

◆ nrf_cracen_cm_int_enable()

NRF_STATIC_INLINE void nrf_cracen_cm_int_enable ( NRF_CRACENCORE_Type * p_reg,
uint32_t mask )

Function for enabling the specified interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_cracen_cm_int_mask_t values for bit masking.

◆ nrf_cracen_cm_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_cracen_cm_int_enable_check ( NRF_CRACENCORE_Type const * p_reg,
uint32_t mask )

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_cracen_cm_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_cracen_cm_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_cracen_cm_int_pending_get ( NRF_CRACENCORE_Type const * p_reg)

Function for getting the state of pending interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Bitmask with information about pending interrupts. Use nrf_cracen_cm_int_mask_t values for bit masking.

◆ nrf_cracen_cm_push_addr_set()

NRF_STATIC_INLINE void nrf_cracen_cm_push_addr_set ( NRF_CRACENCORE_Type * p_reg,
void const * p_buffer )

Function for setting the DMA push pointer to either the buffer into which the DMA will write data (in direct mode), or a pointer to a DMA descriptor (in scatter mode).

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the buffer where to write, or a write descriptor.

◆ nrf_cracen_cm_softreset()

NRF_STATIC_INLINE void nrf_cracen_cm_softreset ( NRF_CRACENCORE_Type * p_reg)

Function for soft resetting the CryptoMaster module.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrf_cracen_cm_start()

NRF_STATIC_INLINE void nrf_cracen_cm_start ( NRF_CRACENCORE_Type * p_reg)

Function for starting the CryptoMaster.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Note
Both the fetch and push DMA engines will be started simultaneously.

◆ nrf_cracen_cm_status_get()

NRF_STATIC_INLINE uint32_t nrf_cracen_cm_status_get ( NRF_CRACENCORE_Type const * p_reg,
uint32_t mask )

Function for getting the status of the CryptoMaster.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of busy conditions to be checked. Use nrf_cracen_cm_status_mask_t values for bit masking.
Returns
Masked busy conditions.