![]() |
nrfx 4.5.0
|
Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) Random Generator (RNG) peripheral. More...
Data Structures | |
| struct | nrf_cracen_rng_control_t |
| CRACEN random generator configuration. More... | |
Macros | |
| #define | NRF_CRACEN_RNG_HAS_IDLE_TIMER 1 |
| Symbol indicating whether the TRNG FSM has an idle timer. | |
| #define | NRF_CRACEN_RNG_HAS_BLENDING 1 |
| Symbol indicating whether the TRNG has entropy blending. | |
| #define | NRF_CRACEN_RNG_HAS_FIFOWRITESTARTUP 1 |
| Symbol indicating whether the TRNG has FIFO start-up write configuration. | |
| #define | NRF_CRACEN_RNG_HAS_REPEATTHRESHOLD 1 |
| Symbol indicating whether the TRNG has REPEATTHRESHOLD register. | |
| #define | NRF_CRACEN_RNG_HAS_PROPTESTCUTOFF 1 |
| Symbol indicating whether the TRNG has PROPTESTCUTOFF register. | |
| #define | NRF_CRACEN_RNG_HAS_DISABLEOSC 1 |
| Symbol indicating whether the TRNG has DISABLEOSC register. | |
| #define | NRF_CRACEN_RNG_HAS_COOLDOWNPERIOD 1 |
| Symbol indicating whether the TRNG has COOLDOWNPERIOD register. | |
| #define | NRF_CRACEN_HAS_RECOMMENDED_CONF 1 |
| Symbol indicating whether the TRNG has specified recommended configuration parameters. | |
| #define | NRF_CRACEN_RNG_FIFO_SIZE ((CRACENCORE_RNGCONTROL_FIFOTHRESHOLD_ResetValue + 1) * 16) |
Enumerations | |
| enum | nrf_cracen_rng_blending_t { NRF_CRACEN_RNG_BLENDING_CONCATENATION = CRACENCORE_RNGCONTROL_CONTROL_BLENDINGMETHOD_CONCATENATION , NRF_CRACEN_RNG_BLENDING_XOR_LEVEL_1 = CRACENCORE_RNGCONTROL_CONTROL_BLENDINGMETHOD_XORLEVEL1 , NRF_CRACEN_RNG_BLENDING_XOR_LEVEL_2 = CRACENCORE_RNGCONTROL_CONTROL_BLENDINGMETHOD_XORLEVEL2 , NRF_CRACEN_RNG_BLENDING_VONNEUMANN = CRACENCORE_RNGCONTROL_CONTROL_BLENDINGMETHOD_VONNEUMANN } |
| CRACEN entropy blending methods. More... | |
| enum | nrf_cracen_rng_fsm_state_t { NRF_CRACEN_RNG_FSM_STATE_RESET = CRACENCORE_RNGCONTROL_STATUS_STATE_RESET , NRF_CRACEN_RNG_FSM_STATE_STARTUP = CRACENCORE_RNGCONTROL_STATUS_STATE_STARTUP , NRF_CRACEN_RNG_FSM_STATE_IDLE_READY = CRACENCORE_RNGCONTROL_STATUS_STATE_IDLERON , NRF_CRACEN_RNG_FSM_STATE_IDLE_STANDBY = CRACENCORE_RNGCONTROL_STATUS_STATE_IDLEROFF , NRF_CRACEN_RNG_FSM_STATE_FILL_FIFO = CRACENCORE_RNGCONTROL_STATUS_STATE_FILLFIFO , NRF_CRACEN_RNG_FSM_STATE_ERROR = CRACENCORE_RNGCONTROL_STATUS_STATE_ERROR } |
| CRACEN random generator FSM state. More... | |
Functions | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_control_set (NRF_CRACENCORE_Type *p_reg, nrf_cracen_rng_control_t const *p_config) |
| Function for setting the control register. | |
| NRF_STATIC_INLINE uint32_t | nrf_cracen_rng_fifo_level_get (NRF_CRACENCORE_Type const *p_reg) |
| Function for getting the FIFO level. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_key_set (NRF_CRACENCORE_Type *p_reg, uint8_t index, uint32_t value) |
| Function for setting the AES conditioning KEY registers. | |
| NRF_STATIC_INLINE nrf_cracen_rng_fsm_state_t | nrf_cracen_rng_fsm_state_get (NRF_CRACENCORE_Type const *p_reg) |
| Function for getting the RNG FSM state. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_init_wait_val_set (NRF_CRACENCORE_Type *p_reg, uint16_t value) |
| Function for setting the initialization wait counter value. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_off_timer_set (NRF_CRACENCORE_Type *p_reg, uint16_t value) |
| Function for setting the switch off timer value. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_clk_div_set (NRF_CRACENCORE_Type *p_reg, uint16_t value) |
| Function for setting the entropy subsampling rate register. | |
| NRF_STATIC_INLINE uint32_t | nrf_cracen_rng_fifo_get (NRF_CRACENCORE_Type const *p_reg) |
| Function for getting a word from the entropy FIFO. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_repeatthreshold_set (NRF_CRACENCORE_Type *p_reg, uint32_t value) |
| Function for setting repetition test cut-off value. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_proptestcutoff_set (NRF_CRACENCORE_Type *p_reg, uint32_t value) |
| Function for setting proportion test cut-off value. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_disableosc_set (NRF_CRACENCORE_Type *p_reg, uint8_t index, uint32_t osc_mask) |
| Function for disabling oscillator rings. | |
| NRF_STATIC_INLINE void | nrf_cracen_rng_cooldown_period_set (NRF_CRACENCORE_Type *p_reg, uint32_t period) |
| Function for setting the period of cool-down sequence. | |
Hardware access layer for managing the Crypto Accelerator Engine (CRACEN) Random Generator (RNG) peripheral.
| #define NRF_CRACEN_RNG_FIFO_SIZE ((CRACENCORE_RNGCONTROL_FIFOTHRESHOLD_ResetValue + 1) * 16) |
Size of the RNG FIFO in bytes
CRACEN entropy blending methods.
CRACEN random generator FSM state.
| NRF_STATIC_INLINE void nrf_cracen_rng_clk_div_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint16_t | value ) |
Function for setting the entropy subsampling rate register.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | value | Value to be written in the register. |
| NRF_STATIC_INLINE void nrf_cracen_rng_control_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| nrf_cracen_rng_control_t const * | p_config ) |
Function for setting the control register.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | p_config | Configuration to be written in the register. |
| NRF_STATIC_INLINE void nrf_cracen_rng_cooldown_period_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint32_t | period ) |
Function for setting the period of cool-down sequence.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | period | Number of clock cycles in cool-down sequence. |
| NRF_STATIC_INLINE void nrf_cracen_rng_disableosc_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint8_t | index, | ||
| uint32_t | osc_mask ) |
Function for disabling oscillator rings.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | index | Oscillator group index. |
| [in] | osc_mask | Mask of oscillator rings to be disabled. |
| NRF_STATIC_INLINE uint32_t nrf_cracen_rng_fifo_get | ( | NRF_CRACENCORE_Type const * | p_reg | ) |
Function for getting a word from the entropy FIFO.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_cracen_rng_fifo_level_get | ( | NRF_CRACENCORE_Type const * | p_reg | ) |
Function for getting the FIFO level.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| NRF_STATIC_INLINE nrf_cracen_rng_fsm_state_t nrf_cracen_rng_fsm_state_get | ( | NRF_CRACENCORE_Type const * | p_reg | ) |
Function for getting the RNG FSM state.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| NRF_STATIC_INLINE void nrf_cracen_rng_init_wait_val_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint16_t | value ) |
Function for setting the initialization wait counter value.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | value | Value to be written in the register. |
| NRF_STATIC_INLINE void nrf_cracen_rng_key_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint8_t | index, | ||
| uint32_t | value ) |
Function for setting the AES conditioning KEY registers.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | index | Index of the key register to be written (0..3). |
| [in] | value | Value to be written in the register. |
| NRF_STATIC_INLINE void nrf_cracen_rng_off_timer_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint16_t | value ) |
Function for setting the switch off timer value.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | value | Value to be written in the register. |
| NRF_STATIC_INLINE void nrf_cracen_rng_proptestcutoff_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint32_t | value ) |
Function for setting proportion test cut-off value.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | value | Proportion test cut-off value. |
| NRF_STATIC_INLINE void nrf_cracen_rng_repeatthreshold_set | ( | NRF_CRACENCORE_Type * | p_reg, |
| uint32_t | value ) |
Function for setting repetition test cut-off value.
| [in] | p_reg | Pointer to the structure of registers of the RNG peripheral. |
| [in] | value | Repetition test cut-off value. |