nrfx 3.3
Data Structures | Macros | Typedefs | Enumerations | Functions
AES CCM HAL

Hardware access layer for managing the AES CCM peripheral. More...

Data Structures

struct  __PACKED
 CCM data structure. More...
 
struct  nrf_ccm_config_t
 CCM configuration. More...
 

Macros

#define NRF_CCM_HAS_TASK_KSGEN   1
 Presence of the KSGEN task.
 
#define NRF_CCM_HAS_TASK_CRYPT   1
 Presence of the CRYPT task.
 
#define NRF_CCM_HAS_TASK_START   1
 Presence of the START task.
 
#define NRF_CCM_HAS_TASK_RATEOVERRIDE   1
 Presence of the RATEOVERRIDE task.
 
#define NRF_CCM_HAS_EVENT_ENDKSGEN   1
 Presence of the ENDKSGEN event.
 
#define NRF_CCM_HAS_EVENT_ENDCRYPT   1
 Presence of the ENDCRYPT event.
 
#define NRF_CCM_HAS_EVENT_END   1
 Presence of the END event.
 
#define NRF_CCM_HAS_ADATAMASK   1
 Presence of the ADATAMASK register.
 
#define NRF_CCM_HAS_CNFPTR   1
 Presence of the CNFPTR register.
 
#define NRF_CCM_HAS_IN_AMOUNT   1
 Presence of the IN.AMOUNT register.
 
#define NRF_CCM_HAS_OUT_AMOUNT   1
 Presence of the OUT.AMOUNT register.
 
#define NRF_CCM_HAS_RATEOVERRIDE   1
 Presence of the RATEOVERRIDE register.
 
#define NRF_CCM_HAS_ERRORSTATUS   1
 Presence of the ERRORSTATUS register.
 
#define NRF_CCM_HAS_MICSTATUS   1
 Presence of the MICSTATUS register.
 
#define NRF_CCM_HAS_MACSTATUS   1
 Presence of the MACSTATUS register.
 
#define NRF_CCM_HAS_KEY   1
 Presence of the KEY register.
 
#define NRF_CCM_HAS_NONCE   1
 Presence of the NONCE register.
 
#define NRF_CCM_HAS_INPTR   1
 Presence of the INPTR register.
 
#define NRF_CCM_HAS_OUTPTR   1
 Presence of the OUTPTR register.
 
#define NRF_CCM_HAS_IN_PTR   1
 Presence of the IN.PTR register.
 
#define NRF_CCM_HAS_OUT_PTR   1
 Presence of the OUT.PTR register.
 
#define NRF_CCM_HAS_SCRATCHPTR   1
 Presence of the SCRATCHPTR register.
 
#define NRF_CCM_HAS_MAXPACKETSIZE   1
 Presence of the MAXPACKETSIZE.
 
#define NRF_CCM_HAS_MODE_FAST_DECRYPTION   1
 
#define NRF_CCM_HAS_MODE_PROTOCOL   1
 Presence of protocol and packet format selection.
 
#define NRF_CCM_HAS_MODE_PROTOCOL_BLE   1
 Presence of the BLE packet format.
 
#define NRF_CCM_HAS_MODE_PROTOCOL_IEEE802154   1
 Presence of the 802.15.4 packet format.
 
#define NRF_CCM_HAS_MODE_LENGTH   1
 Presence of the packet lengh configuration.
 
#define NRF_CCM_HAS_MODE_DATARATE_125KBPS   1
 Support for 125 Kbps radio data rate.
 
#define NRF_CCM_HAS_MODE_DATARATE_125KBIT   1
 Support for 125 Kbit radio data rate.
 
#define NRF_CCM_HAS_MODE_DATARATE_250KBIT   1
 Support for 250 Kbit radio data rate.
 
#define NRF_CCM_HAS_MODE_DATARATE_500KBPS   1
 Support for 500 Kbps radio data rate.
 
#define NRF_CCM_HAS_MODE_DATARATE_500KBIT   1
 Support for 500 Kbit radio data rate.
 
#define NRF_CCM_HAS_MODE_DATARATE_4MBIT   1
 Support for 4 Mbit radio data rate.
 
#define NRF_CCM_HAS_MODE_MACLEN   1
 Presence of the CCM MAC length.
 
#define NRF_CCM_HAS_DATARATE   1
 Presence of the radio data rate that the CCM shall run synchronous with.
 
#define NRF_CCM_HAS_HEADERMASK   1
 Presence of the HEADERMASK register.
 
#define NRF_CCM_KEY_SIZE   16
 AES key size.
 
#define NRF_CCM_IV_SIZE   8
 Initialization vector size.
 
#define NRF_CCM_PKTCTR_SIZE   9
 Packet counter configuration size.
 

Typedefs

typedef struct __PACKED nrf_ccm_cnf_t
 CCM data structure.
 

Enumerations

enum  nrf_ccm_task_t {
  NRF_CCM_TASK_KSGEN = offsetof(NRF_CCM_Type, TASKS_KSGEN) ,
  NRF_CCM_TASK_CRYPT = offsetof(NRF_CCM_Type, TASKS_CRYPT) ,
  NRF_CCM_TASK_STOP = offsetof(NRF_CCM_Type, TASKS_STOP) ,
  NRF_CCM_TASK_START = offsetof(NRF_CCM_Type, TASKS_START) ,
  NRF_CCM_TASK_RATEOVERRIDE = offsetof(NRF_CCM_Type, TASKS_RATEOVERRIDE)
}
 CCM tasks. More...
 
enum  nrf_ccm_event_t {
  NRF_CCM_EVENT_ENDKSGEN = offsetof(NRF_CCM_Type, EVENTS_ENDKSGEN) ,
  NRF_CCM_EVENT_ENDCRYPT = offsetof(NRF_CCM_Type, EVENTS_ENDCRYPT) ,
  NRF_CCM_EVENT_ERROR = offsetof(NRF_CCM_Type, EVENTS_ERROR) ,
  NRF_CCM_EVENT_END = offsetof(NRF_CCM_Type, EVENTS_END)
}
 CCM events. More...
 
enum  nrf_ccm_short_mask_t { NRF_CCM_SHORT_ENDKSGEN_CRYPT_MASK = CCM_SHORTS_ENDKSGEN_CRYPT_Msk }
 Types of CCM shorts. More...
 
enum  nrf_ccm_int_mask_t {
  NRF_CCM_INT_ENDKSGEN_MASK = CCM_INTENSET_ENDKSGEN_Msk ,
  NRF_CCM_INT_ENDCRYPT_MASK = CCM_INTENSET_ENDCRYPT_Msk ,
  NRF_CCM_INT_ERROR_MASK = CCM_INTENSET_ERROR_Msk ,
  NRF_CCM_INT_END_MASK = CCM_INTENSET_END_Msk
}
 CCM interrupts. More...
 
enum  nrf_ccm_error_t {
  NRF_CCM_ERROR_NO_ERROR = CCM_ERRORSTATUS_ERRORSTATUS_NoError ,
  NRF_CCM_ERROR_PREMATURE_INPTR_END = CCM_ERRORSTATUS_ERRORSTATUS_PrematureInptrEnd ,
  NRF_CCM_ERROR_PREMATURE_OUTPTR_END = CCM_ERRORSTATUS_ERRORSTATUS_PrematureOutptrEnd ,
  NRF_CCM_ERROR_ENCRYPTION_TOO_SLOW = CCM_ERRORSTATUS_ERRORSTATUS_EncryptionTooSlow
}
 CCM error status when ERROR event is generated. More...
 
enum  nrf_ccm_mode_t {
  NRF_CCM_MODE_ENCRYPTION = CCM_MODE_MODE_Encryption ,
  NRF_CCM_MODE_DECRYPTION = CCM_MODE_MODE_Decryption ,
  NRF_CCM_MODE_FAST_DECRYPTION = CCM_MODE_MODE_FastDecryption
}
 CCM modes of operation. More...
 
enum  nrf_ccm_datarate_t {
  NRF_CCM_DATARATE_125K = CCM_MODE_DATARATE_125Kbps ,
  NRF_CCM_DATARATE_250K = CCM_MODE_DATARATE_250Kbit ,
  NRF_CCM_DATARATE_500K = CCM_MODE_DATARATE_500Kbps ,
  NRF_CCM_DATARATE_1M = CCM_MODE_DATARATE_1Mbit ,
  NRF_CCM_DATARATE_2M = CCM_MODE_DATARATE_2Mbit ,
  NRF_CCM_DATARATE_4M = CCM_MODE_DATARATE_4Mbit
}
 CCM data rates. More...
 
enum  nrf_ccm_protocol_t {
  NRF_CCM_MODE_PROTOCOL_BLE = CCM_MODE_PROTOCOL_Ble ,
  NRF_CCM_MODE_PROTOCOL_IEEE802154 = CCM_MODE_PROTOCOL_Ieee802154
}
 CCM protocol and packet format. More...
 
enum  nrf_ccm_length_t {
  NRF_CCM_LENGTH_DEFAULT = CCM_MODE_LENGTH_Default ,
  NRF_CCM_LENGTH_EXTENDED = CCM_MODE_LENGTH_Extended
}
 CCM packet length options. More...
 
enum  nrf_ccm_maclen_t {
  NRF_CCM_MODE_MACLEN_M0 = CCM_MODE_MACLEN_M0 ,
  NRF_CCM_MODE_MACLEN_M4 = CCM_MODE_MACLEN_M4 ,
  NRF_CCM_MODE_MACLEN_M6 = CCM_MODE_MACLEN_M6 ,
  NRF_CCM_MODE_MACLEN_M8 = CCM_MODE_MACLEN_M8 ,
  NRF_CCM_MODE_MACLEN_M10 = CCM_MODE_MACLEN_M10 ,
  NRF_CCM_MODE_MACLEN_M12 = CCM_MODE_MACLEN_M12 ,
  NRF_CCM_MODE_MACLEN_M14 = CCM_MODE_MACLEN_M14 ,
  NRF_CCM_MODE_MACLEN_M16 = CCM_MODE_MACLEN_M16
}
 CCM MAC length. More...
 

Functions

NRF_STATIC_INLINE void nrf_ccm_task_trigger (NRF_CCM_Type *p_reg, nrf_ccm_task_t task)
 Function for activating a specific CCM task.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_task_address_get (NRF_CCM_Type const *p_reg, nrf_ccm_task_t task)
 Function for getting the address of a specific CCM task register.
 
NRF_STATIC_INLINE void nrf_ccm_event_clear (NRF_CCM_Type *p_reg, nrf_ccm_event_t event)
 Function for clearing a specific CCM event.
 
NRF_STATIC_INLINE bool nrf_ccm_event_check (NRF_CCM_Type const *p_reg, nrf_ccm_event_t event)
 Function for retrieving the state of a specific CCM event.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_event_address_get (NRF_CCM_Type const *p_reg, nrf_ccm_event_t event)
 Function for getting the address of a specific CCM event register.
 
NRF_STATIC_INLINE void nrf_ccm_shorts_enable (NRF_CCM_Type *p_reg, uint32_t mask)
 Function for enabling the specified shortcuts.
 
NRF_STATIC_INLINE void nrf_ccm_shorts_disable (NRF_CCM_Type *p_reg, uint32_t mask)
 Function for disabling the specified shortcuts.
 
NRF_STATIC_INLINE void nrf_ccm_shorts_set (NRF_CCM_Type *p_reg, uint32_t mask)
 Function for setting the specified shortcuts.
 
NRF_STATIC_INLINE void nrf_ccm_int_enable (NRF_CCM_Type *p_reg, uint32_t mask)
 Function for enabling specified interrupts.
 
NRF_STATIC_INLINE void nrf_ccm_int_disable (NRF_CCM_Type *p_reg, uint32_t mask)
 Function for disabling specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_int_enable_check (NRF_CCM_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE void nrf_ccm_enable (NRF_CCM_Type *p_reg)
 Function for enabling the CCM peripheral.
 
NRF_STATIC_INLINE void nrf_ccm_disable (NRF_CCM_Type *p_reg)
 Function for disabling the CCM peripheral.
 
NRF_STATIC_INLINE void nrf_ccm_configure (NRF_CCM_Type *p_reg, nrf_ccm_config_t const *p_config)
 Function for setting the CCM peripheral configuration.
 
NRF_STATIC_INLINE void nrf_ccm_maxpacketsize_set (NRF_CCM_Type *p_reg, uint8_t size)
 Function for setting the length of key-stream generated when the packet length is configured as extended.
 
NRF_STATIC_INLINE bool nrf_ccm_micstatus_get (NRF_CCM_Type const *p_reg)
 Function for getting the MIC check result.
 
NRF_STATIC_INLINE bool nrf_ccm_macstatus_get (NRF_CCM_Type const *p_reg)
 Function for getting the MAC check result.
 
NRF_STATIC_INLINE nrf_ccm_error_t nrf_ccm_errorstatus_get (NRF_CCM_Type const *p_reg)
 Function for getting the error status when ERROR event is generated.
 
NRF_STATIC_INLINE void nrf_ccm_cnfptr_set (NRF_CCM_Type *p_reg, nrf_ccm_cnf_t const *p_data)
 Function for setting the pointer to the data structure holding the AES key and the CCM NONCE vector.
 
NRF_STATIC_INLINE nrf_ccm_cnf_tnrf_ccm_cnfptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the pointer to the data structure holding the AES key and the CCM NONCE vector.
 
NRF_STATIC_INLINE void nrf_ccm_key_set (NRF_CCM_Type *p_reg, uint32_t const *p_key)
 Function for setting the AES key.
 
NRF_STATIC_INLINE uint32_t const volatile * nrf_ccm_key_get (NRF_CCM_Type const *p_reg)
 Function for getting the AES key.
 
NRF_STATIC_INLINE void nrf_ccm_nonce_set (NRF_CCM_Type *p_reg, uint32_t const *p_nonce)
 Function for setting the AES nonce.
 
NRF_STATIC_INLINE uint32_t const volatile * nrf_ccm_nonce_get (NRF_CCM_Type const *p_reg)
 Function for getting the AES nonce.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_in_amount_get (NRF_CCM_Type const *p_reg)
 Function for getting number of bytes read from the input data, not including the job list structure.
 
NRF_STATIC_INLINE void nrf_ccm_inptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_data)
 Function for setting the input data pointer.
 
NRF_STATIC_INLINE uint32_t * nrf_ccm_inptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the input data pointer.
 
NRF_STATIC_INLINE void nrf_ccm_in_ptr_set (NRF_CCM_Type *p_reg, nrf_vdma_job_t const *p_job)
 Function for setting the pointer to a job list containing unencrypted CCM data structure in Encryption mode or encrypted CCM data structure in Decryption mode.
 
NRF_STATIC_INLINE nrf_vdma_job_tnrf_ccm_in_ptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the pointer to job list containing unencrypted CCM data structure in Encryption mode or encrypted CCM data structure in Decryption mode.
 
NRF_STATIC_INLINE void nrf_ccm_outptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_data)
 Function for setting the output data pointer.
 
NRF_STATIC_INLINE uint32_t * nrf_ccm_outptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the output data pointer.
 
NRF_STATIC_INLINE void nrf_ccm_out_ptr_set (NRF_CCM_Type *p_reg, nrf_vdma_job_t const *p_job)
 Function for setting the pointer to a job list containing encrypted CCM data structure in Encryption mode or decrypted CCM data structure in Decryption mode.
 
NRF_STATIC_INLINE nrf_vdma_job_tnrf_ccm_out_ptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the pointer to a job list containing encrypted CCM data structure in Encryption mode or decrypted CCM data structure in Decryption mode.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_out_amount_get (NRF_CCM_Type const *p_reg)
 Function for getting number of bytes available in the output data, not including the job list structure.
 
NRF_STATIC_INLINE void nrf_ccm_scratchptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_area)
 Function for setting the pointer to the scratch area used for temporary storage.
 
NRF_STATIC_INLINE uint32_t * nrf_ccm_scratchptr_get (NRF_CCM_Type const *p_reg)
 Function for getting the pointer to the scratch area.
 
NRF_STATIC_INLINE void nrf_ccm_datarate_override_set (NRF_CCM_Type *p_reg, nrf_ccm_datarate_t datarate)
 Function for setting the data rate override value.
 
NRF_STATIC_INLINE nrf_ccm_datarate_t nrf_ccm_datarate_override_get (NRF_CCM_Type const *p_reg)
 Function for getting data override setting.
 
NRF_STATIC_INLINE void nrf_ccm_adatamask_set (NRF_CCM_Type *p_reg, uint8_t adata_msk)
 Function for setting the CCM adata mask.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_adatamask_get (NRF_CCM_Type const *p_reg)
 Function for getting bitmask for the first adata byte.
 
NRF_STATIC_INLINE void nrf_ccm_headermask_set (NRF_CCM_Type *p_reg, uint8_t header_msk)
 Function for setting the CCM header mask.
 
NRF_STATIC_INLINE uint32_t nrf_ccm_headermask_get (NRF_CCM_Type const *p_reg)
 Function for getting the bitmask for packet header (S0) before MIC generation/authentication.
 
NRF_STATIC_INLINE void nrf_ccm_subscribe_set (NRF_CCM_Type *p_reg, nrf_ccm_task_t task, uint8_t channel)
 Function for setting the subscribe configuration for a given CCM task.
 
NRF_STATIC_INLINE void nrf_ccm_subscribe_clear (NRF_CCM_Type *p_reg, nrf_ccm_task_t task)
 Function for clearing the subscribe configuration for a given CCM task.
 
NRF_STATIC_INLINE void nrf_ccm_publish_set (NRF_CCM_Type *p_reg, nrf_ccm_event_t event, uint8_t channel)
 Function for setting the publish configuration for a given CCM event.
 
NRF_STATIC_INLINE void nrf_ccm_publish_clear (NRF_CCM_Type *p_reg, nrf_ccm_event_t event)
 Function for clearing the publish configuration for a given CCM event.
 

Detailed Description

Hardware access layer for managing the AES CCM peripheral.

Macro Definition Documentation

◆ NRF_CCM_HAS_MODE_FAST_DECRYPTION

#define NRF_CCM_HAS_MODE_FAST_DECRYPTION   1

Presence of AES fast decrypt mode.

Enumeration Type Documentation

◆ nrf_ccm_datarate_t

CCM data rates.

Enumerator
NRF_CCM_DATARATE_125K 

125 Kbps.

NRF_CCM_DATARATE_250K 

250 Kbps.

NRF_CCM_DATARATE_500K 

500 Kbps.

NRF_CCM_DATARATE_1M 

1 Mbps.

NRF_CCM_DATARATE_2M 

2 Mbps.

NRF_CCM_DATARATE_4M 

4 Mbps.

◆ nrf_ccm_error_t

CCM error status when ERROR event is generated.

Enumerator
NRF_CCM_ERROR_NO_ERROR 

No errors have occurred.

NRF_CCM_ERROR_PREMATURE_INPTR_END 

End of INPTR job list before CCM data structure was read.

NRF_CCM_ERROR_PREMATURE_OUTPTR_END 

End of OUTPTR job list before CCM data structure was read.

NRF_CCM_ERROR_ENCRYPTION_TOO_SLOW 

Encryption did not complete in time.

◆ nrf_ccm_event_t

CCM events.

Enumerator
NRF_CCM_EVENT_ENDKSGEN 

Keystream generation complete.

NRF_CCM_EVENT_ENDCRYPT 

Encrypt/decrypt complete.

NRF_CCM_EVENT_ERROR 

CCM error event.

NRF_CCM_EVENT_END 

Encrypt/decrypt complete.

◆ nrf_ccm_int_mask_t

CCM interrupts.

Enumerator
NRF_CCM_INT_ENDKSGEN_MASK 

Interrupt on ENDKSGEN event.

NRF_CCM_INT_ENDCRYPT_MASK 

Interrupt on ENDCRYPT event.

NRF_CCM_INT_ERROR_MASK 

Interrupt on ERROR event.

NRF_CCM_INT_END_MASK 

Interrupt on END event.

◆ nrf_ccm_length_t

CCM packet length options.

Enumerator
NRF_CCM_LENGTH_DEFAULT 

Default length.

NRF_CCM_LENGTH_EXTENDED 

Extended length.

◆ nrf_ccm_maclen_t

CCM MAC length.

Enumerator
NRF_CCM_MODE_MACLEN_M0 

0 bytes.

NRF_CCM_MODE_MACLEN_M4 

4 bytes.

NRF_CCM_MODE_MACLEN_M6 

6 bytes.

NRF_CCM_MODE_MACLEN_M8 

8 bytes.

NRF_CCM_MODE_MACLEN_M10 

10 bytes.

NRF_CCM_MODE_MACLEN_M12 

12 bytes.

NRF_CCM_MODE_MACLEN_M14 

14 bytes.

NRF_CCM_MODE_MACLEN_M16 

16 bytes.

◆ nrf_ccm_mode_t

CCM modes of operation.

Enumerator
NRF_CCM_MODE_ENCRYPTION 

Encryption mode.

NRF_CCM_MODE_DECRYPTION 

Decryption mode.

NRF_CCM_MODE_FAST_DECRYPTION 

Fast decryption mode.

◆ nrf_ccm_protocol_t

CCM protocol and packet format.

Enumerator
NRF_CCM_MODE_PROTOCOL_BLE 

BLE packet format.

NRF_CCM_MODE_PROTOCOL_IEEE802154 

802.15.4 packet format.

◆ nrf_ccm_short_mask_t

Types of CCM shorts.

Enumerator
NRF_CCM_SHORT_ENDKSGEN_CRYPT_MASK 

Shortcut for starting encryption/decryption when the key-stream generation is complete.

◆ nrf_ccm_task_t

CCM tasks.

Enumerator
NRF_CCM_TASK_KSGEN 

Start generation of key-stream.

NRF_CCM_TASK_CRYPT 

Start encryption/decryption.

NRF_CCM_TASK_STOP 

Stop encryption/decryption.

NRF_CCM_TASK_START 

Start encryption/decryption.

NRF_CCM_TASK_RATEOVERRIDE 

Override DATARATE setting in MODE register.

Function Documentation

◆ nrf_ccm_adatamask_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_adatamask_get ( NRF_CCM_Type const *  p_reg)

Function for getting bitmask for the first adata byte.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
CCM adata mask.

◆ nrf_ccm_adatamask_set()

NRF_STATIC_INLINE void nrf_ccm_adatamask_set ( NRF_CCM_Type *  p_reg,
uint8_t  adata_msk 
)

Function for setting the CCM adata mask.

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

◆ nrf_ccm_cnfptr_get()

NRF_STATIC_INLINE nrf_ccm_cnf_t * nrf_ccm_cnfptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the pointer to the data structure holding the AES key and the CCM NONCE vector.

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

◆ nrf_ccm_cnfptr_set()

NRF_STATIC_INLINE void nrf_ccm_cnfptr_set ( NRF_CCM_Type *  p_reg,
nrf_ccm_cnf_t const *  p_data 
)

Function for setting the pointer to the data structure holding the AES key and the CCM NONCE vector.

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

◆ nrf_ccm_configure()

NRF_STATIC_INLINE void nrf_ccm_configure ( NRF_CCM_Type *  p_reg,
nrf_ccm_config_t const *  p_config 
)

Function for setting the CCM peripheral configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with configuration to be set.

◆ nrf_ccm_datarate_override_get()

NRF_STATIC_INLINE nrf_ccm_datarate_t nrf_ccm_datarate_override_get ( NRF_CCM_Type const *  p_reg)

Function for getting data override setting.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Data override setting.

◆ nrf_ccm_datarate_override_set()

NRF_STATIC_INLINE void nrf_ccm_datarate_override_set ( NRF_CCM_Type *  p_reg,
nrf_ccm_datarate_t  datarate 
)

Function for setting the data rate override value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]datarateOverride value to be applied when the RATEOVERRIDE task is triggered.

◆ nrf_ccm_disable()

NRF_STATIC_INLINE void nrf_ccm_disable ( NRF_CCM_Type *  p_reg)

Function for disabling the CCM peripheral.

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

◆ nrf_ccm_enable()

NRF_STATIC_INLINE void nrf_ccm_enable ( NRF_CCM_Type *  p_reg)

Function for enabling the CCM peripheral.

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

◆ nrf_ccm_errorstatus_get()

NRF_STATIC_INLINE nrf_ccm_error_t nrf_ccm_errorstatus_get ( NRF_CCM_Type const *  p_reg)

Function for getting the error status when ERROR event is generated.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Errorstatus when the ERROR event is generated.

◆ nrf_ccm_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_event_address_get ( NRF_CCM_Type const *  p_reg,
nrf_ccm_event_t  event 
)

Function for getting the address of a specific CCM event register.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventRequested event.
Returns
Address of the specified event register.

◆ nrf_ccm_event_check()

NRF_STATIC_INLINE bool nrf_ccm_event_check ( NRF_CCM_Type const *  p_reg,
nrf_ccm_event_t  event 
)

Function for retrieving the state of a specific CCM event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_ccm_event_clear()

NRF_STATIC_INLINE void nrf_ccm_event_clear ( NRF_CCM_Type *  p_reg,
nrf_ccm_event_t  event 
)

Function for clearing a specific CCM event.

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

◆ nrf_ccm_headermask_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_headermask_get ( NRF_CCM_Type const *  p_reg)

Function for getting the bitmask for packet header (S0) before MIC generation/authentication.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
CCM header mask.

◆ nrf_ccm_headermask_set()

NRF_STATIC_INLINE void nrf_ccm_headermask_set ( NRF_CCM_Type *  p_reg,
uint8_t  header_msk 
)

Function for setting the CCM header mask.

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

◆ nrf_ccm_in_amount_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_in_amount_get ( NRF_CCM_Type const *  p_reg)

Function for getting number of bytes read from the input data, not including the job list structure.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Number of bytes read from the input data.

◆ nrf_ccm_in_ptr_get()

NRF_STATIC_INLINE nrf_vdma_job_t * nrf_ccm_in_ptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the pointer to job list containing unencrypted CCM data structure in Encryption mode or encrypted CCM data structure in Decryption mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to a job list.

◆ nrf_ccm_in_ptr_set()

NRF_STATIC_INLINE void nrf_ccm_in_ptr_set ( NRF_CCM_Type *  p_reg,
nrf_vdma_job_t const *  p_job 
)

Function for setting the pointer to a job list containing unencrypted CCM data structure in Encryption mode or encrypted CCM data structure in Decryption mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_jobPointer to a job list.

◆ nrf_ccm_inptr_get()

NRF_STATIC_INLINE uint32_t * nrf_ccm_inptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the input data pointer.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Input data pointer.

◆ nrf_ccm_inptr_set()

NRF_STATIC_INLINE void nrf_ccm_inptr_set ( NRF_CCM_Type *  p_reg,
uint32_t const *  p_data 
)

Function for setting the input data pointer.

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

◆ nrf_ccm_int_disable()

NRF_STATIC_INLINE void nrf_ccm_int_disable ( NRF_CCM_Type *  p_reg,
uint32_t  mask 
)

Function for disabling specified interrupts.

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

◆ nrf_ccm_int_enable()

NRF_STATIC_INLINE void nrf_ccm_int_enable ( NRF_CCM_Type *  p_reg,
uint32_t  mask 
)

Function for enabling specified interrupts.

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

◆ nrf_ccm_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_ccm_int_enable_check ( NRF_CCM_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_ccm_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_ccm_key_get()

NRF_STATIC_INLINE uint32_t const volatile * nrf_ccm_key_get ( NRF_CCM_Type const *  p_reg)

Function for getting the AES key.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the AES 128-bit key value. The key is stored in big endian byte order.

◆ nrf_ccm_key_set()

NRF_STATIC_INLINE void nrf_ccm_key_set ( NRF_CCM_Type *  p_reg,
uint32_t const *  p_key 
)

Function for setting the AES key.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_keyPointer to the AES 128-bit key value. The key shall be stored in big endian byte order.

◆ nrf_ccm_macstatus_get()

NRF_STATIC_INLINE bool nrf_ccm_macstatus_get ( NRF_CCM_Type const *  p_reg)

Function for getting the MAC check result.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe MAC check passed.
falseThe MAC check failed.

◆ nrf_ccm_maxpacketsize_set()

NRF_STATIC_INLINE void nrf_ccm_maxpacketsize_set ( NRF_CCM_Type *  p_reg,
uint8_t  size 
)

Function for setting the length of key-stream generated when the packet length is configured as extended.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]sizeMaximum length of the key-stream.

◆ nrf_ccm_micstatus_get()

NRF_STATIC_INLINE bool nrf_ccm_micstatus_get ( NRF_CCM_Type const *  p_reg)

Function for getting the MIC check result.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe MIC check passed.
falseThe MIC check failed.

◆ nrf_ccm_nonce_get()

NRF_STATIC_INLINE uint32_t const volatile * nrf_ccm_nonce_get ( NRF_CCM_Type const *  p_reg)

Function for getting the AES nonce.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the AES 13-byte nonce value. The nonce is stored in big endian byte order.

◆ nrf_ccm_nonce_set()

NRF_STATIC_INLINE void nrf_ccm_nonce_set ( NRF_CCM_Type *  p_reg,
uint32_t const *  p_nonce 
)

Function for setting the AES nonce.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_noncePointer to the AES 13-byte nonce value. The nonce shall be stored in big endian byte order.

◆ nrf_ccm_out_amount_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_out_amount_get ( NRF_CCM_Type const *  p_reg)

Function for getting number of bytes available in the output data, not including the job list structure.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Number of bytes available in the output data.

◆ nrf_ccm_out_ptr_get()

NRF_STATIC_INLINE nrf_vdma_job_t * nrf_ccm_out_ptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the pointer to a job list containing encrypted CCM data structure in Encryption mode or decrypted CCM data structure in Decryption mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the job list.

◆ nrf_ccm_out_ptr_set()

NRF_STATIC_INLINE void nrf_ccm_out_ptr_set ( NRF_CCM_Type *  p_reg,
nrf_vdma_job_t const *  p_job 
)

Function for setting the pointer to a job list containing encrypted CCM data structure in Encryption mode or decrypted CCM data structure in Decryption mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_jobPointer to a job list.

◆ nrf_ccm_outptr_get()

NRF_STATIC_INLINE uint32_t * nrf_ccm_outptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the output data pointer.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Output data pointer.

◆ nrf_ccm_outptr_set()

NRF_STATIC_INLINE void nrf_ccm_outptr_set ( NRF_CCM_Type *  p_reg,
uint32_t const *  p_data 
)

Function for setting the output data pointer.

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

◆ nrf_ccm_publish_clear()

NRF_STATIC_INLINE void nrf_ccm_publish_clear ( NRF_CCM_Type *  p_reg,
nrf_ccm_event_t  event 
)

Function for clearing the publish configuration for a given CCM event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrf_ccm_publish_set()

NRF_STATIC_INLINE void nrf_ccm_publish_set ( NRF_CCM_Type *  p_reg,
nrf_ccm_event_t  event,
uint8_t  channel 
)

Function for setting the publish configuration for a given CCM event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrf_ccm_scratchptr_get()

NRF_STATIC_INLINE uint32_t * nrf_ccm_scratchptr_get ( NRF_CCM_Type const *  p_reg)

Function for getting the pointer to the scratch area.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the scratch area.

◆ nrf_ccm_scratchptr_set()

NRF_STATIC_INLINE void nrf_ccm_scratchptr_set ( NRF_CCM_Type *  p_reg,
uint32_t const *  p_area 
)

Function for setting the pointer to the scratch area used for temporary storage.

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

◆ nrf_ccm_shorts_disable()

NRF_STATIC_INLINE void nrf_ccm_shorts_disable ( NRF_CCM_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the specified shortcuts.

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

◆ nrf_ccm_shorts_enable()

NRF_STATIC_INLINE void nrf_ccm_shorts_enable ( NRF_CCM_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the specified shortcuts.

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

◆ nrf_ccm_shorts_set()

NRF_STATIC_INLINE void nrf_ccm_shorts_set ( NRF_CCM_Type *  p_reg,
uint32_t  mask 
)

Function for setting the specified shortcuts.

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

◆ nrf_ccm_subscribe_clear()

NRF_STATIC_INLINE void nrf_ccm_subscribe_clear ( NRF_CCM_Type *  p_reg,
nrf_ccm_task_t  task 
)

Function for clearing the subscribe configuration for a given CCM task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrf_ccm_subscribe_set()

NRF_STATIC_INLINE void nrf_ccm_subscribe_set ( NRF_CCM_Type *  p_reg,
nrf_ccm_task_t  task,
uint8_t  channel 
)

Function for setting the subscribe configuration for a given CCM task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrf_ccm_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_ccm_task_address_get ( NRF_CCM_Type const *  p_reg,
nrf_ccm_task_t  task 
)

Function for getting the address of a specific CCM task register.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.
Returns
Address of the specified task register.

◆ nrf_ccm_task_trigger()

NRF_STATIC_INLINE void nrf_ccm_task_trigger ( NRF_CCM_Type *  p_reg,
nrf_ccm_task_t  task 
)

Function for activating a specific CCM task.

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

Documentation feedback | Developer Zone | Subscribe | Updated