RNG Configuration functions

Functions

__STATIC_INLINE void ll_rng_enable (rng_regs_t *RNGx)
 Enable Random Number Generation. More...
 
__STATIC_INLINE void ll_rng_disable (rng_regs_t *RNGx)
 Disable Random Number Generation. More...
 
__STATIC_INLINE uint32_t ll_rng_is_enabled (rng_regs_t *RNGx)
 Check if Random Number Generator is enabled. More...
 
__STATIC_INLINE void ll_rng_enable_fro (rng_regs_t *RNGx)
 Enable Ring oscillator TRNG enabled signal. More...
 
__STATIC_INLINE void ll_rng_disable_fro (rng_regs_t *RNGx)
 Disable Ring oscillator TRNG enabled signal. More...
 
__STATIC_INLINE uint32_t ll_rng_fro_is_enabled (rng_regs_t *RNGx)
 Check if Ring oscillator TRNG enabled signal is enabled. More...
 
__STATIC_INLINE void ll_rng_set_lfsr_seed (rng_regs_t *RNGx, uint32_t seed)
 Set source of LFSR seed. More...
 
__STATIC_INLINE uint32_t ll_rng_get_lfsr_seed (rng_regs_t *RNGx)
 Get source of LFSR seed. More...
 
__STATIC_INLINE void ll_rng_set_lfsr_mode (rng_regs_t *RNGx, uint32_t mode)
 Set LFSR configuration mode. More...
 
__STATIC_INLINE uint32_t ll_rng_get_lfsr_mode (rng_regs_t *RNGx)
 Get LFSR configuration mode. More...
 
__STATIC_INLINE void ll_rng_set_post_mode (rng_regs_t *RNGx, uint32_t post)
 Set RNG post-process configuration. More...
 
__STATIC_INLINE uint32_t ll_rng_get_post_mode (rng_regs_t *RNGx)
 Get RNG post-process configuration. More...
 
__STATIC_INLINE void ll_rng_set_output_mode (rng_regs_t *RNGx, uint32_t mode)
 set RNG output mode. More...
 
__STATIC_INLINE uint32_t ll_rng_get_output_mode (rng_regs_t *RNGx)
 get RNG output mode. More...
 
__STATIC_INLINE void ll_rng_set_trdy_time (rng_regs_t *RNGx, uint32_t time)
 set the waiting time that RNG input reaches stable. More...
 
__STATIC_INLINE uint32_t ll_rng_get_trdy_time (rng_regs_t *RNGx)
 get the waiting time that RNG input reaches stable. More...
 
__STATIC_INLINE void ll_rng_set_user_seed (rng_regs_t *RNGx, uint32_t seed)
 set RNG seed configured by user. More...
 

Detailed Description

Function Documentation

◆ ll_rng_disable()

__STATIC_INLINE void ll_rng_disable ( rng_regs_t *  RNGx)

Disable Random Number Generation.

Register|BitsName --------|-------- CTRL | RNG_RUN

Parameters
RNGxRNG instance.
Return values
None

Definition at line 210 of file ll_rng.h.

◆ ll_rng_disable_fro()

__STATIC_INLINE void ll_rng_disable_fro ( rng_regs_t *  RNGx)

Disable Ring oscillator TRNG enabled signal.

Register|BitsName --------|-------- CTRL | RNG_RUN

Parameters
RNGxRNG instance.
Return values
None

Definition at line 255 of file ll_rng.h.

◆ ll_rng_enable()

__STATIC_INLINE void ll_rng_enable ( rng_regs_t *  RNGx)

Enable Random Number Generation.

Register|BitsName --------|-------- CTRL | RNG_RUN

Parameters
RNGxRNG instance.
Return values
None

Definition at line 195 of file ll_rng.h.

◆ ll_rng_enable_fro()

__STATIC_INLINE void ll_rng_enable_fro ( rng_regs_t *  RNGx)

Enable Ring oscillator TRNG enabled signal.

Register|BitsName --------|-------- CONFIG | RNG_FRO_EN

Parameters
RNGxRNG instance.
Return values
None

Definition at line 240 of file ll_rng.h.

◆ ll_rng_fro_is_enabled()

__STATIC_INLINE uint32_t ll_rng_fro_is_enabled ( rng_regs_t *  RNGx)

Check if Ring oscillator TRNG enabled signal is enabled.

Register|BitsName --------|-------- CTRL | RNG_RUN

Parameters
RNGxRNG instance.
Return values
Stateof bit (1 or 0).

Definition at line 270 of file ll_rng.h.

◆ ll_rng_get_lfsr_mode()

__STATIC_INLINE uint32_t ll_rng_get_lfsr_mode ( rng_regs_t *  RNGx)

Get LFSR configuration mode.

Register|BitsName --------|-------- CONFIG | RNG_LFSR_MODE

Parameters
RNGxRNG instance.
Return values
Returnedvalue can be one of the following values:

Definition at line 340 of file ll_rng.h.

◆ ll_rng_get_lfsr_seed()

__STATIC_INLINE uint32_t ll_rng_get_lfsr_seed ( rng_regs_t *  RNGx)

Get source of LFSR seed.

Register|BitsName --------|-------- CONFIG | RNG_LFSR_SEED_SEL

Parameters
RNGxRNG instance.
Return values
Returnedvalue can be one of the following values:

Definition at line 305 of file ll_rng.h.

◆ ll_rng_get_output_mode()

__STATIC_INLINE uint32_t ll_rng_get_output_mode ( rng_regs_t *  RNGx)

get RNG output mode.

Register|BitsName --------|-------- CONFIG | RNG_OUT_MODE

Parameters
RNGxRNG instance.
Return values
Returnedvalue can be one of the following values:

Definition at line 420 of file ll_rng.h.

◆ ll_rng_get_post_mode()

__STATIC_INLINE uint32_t ll_rng_get_post_mode ( rng_regs_t *  RNGx)

Get RNG post-process configuration.

Register|BitsName --------|-------- CONFIG | RNG_POST_MODE

Parameters
RNGxRNG instance.
Return values
Returnedvalue can be one of the following values:

Definition at line 379 of file ll_rng.h.

◆ ll_rng_get_trdy_time()

__STATIC_INLINE uint32_t ll_rng_get_trdy_time ( rng_regs_t *  RNGx)

get the waiting time that RNG input reaches stable.

Register|BitsName --------|-------- TSCON | RNG_TRDY_TIME

Parameters
RNGxRNG instance.
Return values
BetweenMin_Time = 0 and Max_Time = 0xFF

Definition at line 451 of file ll_rng.h.

◆ ll_rng_is_enabled()

__STATIC_INLINE uint32_t ll_rng_is_enabled ( rng_regs_t *  RNGx)

Check if Random Number Generator is enabled.

Register|BitsName --------|-------- CTRL | RNG_RUN

Parameters
RNGxRNG instance.
Return values
Stateof bit (1 or 0).

Definition at line 225 of file ll_rng.h.

◆ ll_rng_set_lfsr_mode()

__STATIC_INLINE void ll_rng_set_lfsr_mode ( rng_regs_t *  RNGx,
uint32_t  mode 
)

Set LFSR configuration mode.

Register|BitsName --------|-------- CONFIG | RNG_LFSR_MODE

Parameters
RNGxRNG instance.
modeThis parameter can be one of the following values:
Return values
None

Definition at line 323 of file ll_rng.h.

◆ ll_rng_set_lfsr_seed()

__STATIC_INLINE void ll_rng_set_lfsr_seed ( rng_regs_t *  RNGx,
uint32_t  seed 
)

Set source of LFSR seed.

Register|BitsName --------|-------- CONFIG | RNG_LFSR_SEED_SEL

Parameters
RNGxRNG instance.
seedThis parameter can be one of the following values:
Return values
None

Definition at line 288 of file ll_rng.h.

◆ ll_rng_set_output_mode()

__STATIC_INLINE void ll_rng_set_output_mode ( rng_regs_t *  RNGx,
uint32_t  mode 
)

set RNG output mode.

Register|BitsName --------|-------- CONFIG | RNG_OUT_MODE

Parameters
RNGxRNG instance.
modeThis parameter can be one of the following values:
Return values
None

Definition at line 400 of file ll_rng.h.

◆ ll_rng_set_post_mode()

__STATIC_INLINE void ll_rng_set_post_mode ( rng_regs_t *  RNGx,
uint32_t  post 
)

Set RNG post-process configuration.

Register|BitsName --------|-------- CONFIG | RNG_POST_MODE

Parameters
RNGxRNG instance.
postThis parameter can be one of the following values:
Return values
None

Definition at line 360 of file ll_rng.h.

◆ ll_rng_set_trdy_time()

__STATIC_INLINE void ll_rng_set_trdy_time ( rng_regs_t *  RNGx,
uint32_t  time 
)

set the waiting time that RNG input reaches stable.

Register|BitsName --------|-------- TSCON | RNG_TRDY_TIME

Parameters
RNGxRNG instance.
timerange between 0x1 and 0xFF.
Return values
None

Definition at line 436 of file ll_rng.h.

◆ ll_rng_set_user_seed()

__STATIC_INLINE void ll_rng_set_user_seed ( rng_regs_t *  RNGx,
uint32_t  seed 
)

set RNG seed configured by user.

Register|BitsName --------|-------- USER | RNG_USER_SEED

Parameters
RNGxRNG instance.
seedrange between 0x1 and 0xFFFF.
Return values
None

Definition at line 468 of file ll_rng.h.