Functions
RNG Configuration functions
Peripheral Driver » LL Driver » RNG » Functions
Collaboration diagram for 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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CTRL | RNG_RUN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  None |

Definition at line 223 of file gr55xx_ll_rng.h.

## ◆ ll_rng_disable_fro()

__STATIC_INLINE void ll_rng_disable_fro | ( | rng_regs_t * | RNGx | ) |

Disable Ring oscillator TRNG enabled signal.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CTRL | RNG_RUN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  None |

Definition at line 280 of file gr55xx_ll_rng.h.

## ◆ ll_rng_enable()

__STATIC_INLINE void ll_rng_enable | ( | rng_regs_t * | RNGx | ) |

Enable Random Number Generation.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CTRL | RNG_RUN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  None |

Definition at line 204 of file gr55xx_ll_rng.h.

## ◆ ll_rng_enable_fro()

__STATIC_INLINE void ll_rng_enable_fro | ( | rng_regs_t * | RNGx | ) |

Enable Ring oscillator TRNG enabled signal.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_FRO_EN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  None |

Definition at line 261 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CTRL | RNG_RUN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  State | of bit (1 or 0).

Definition at line 299 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_LFSR_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  Returned | value can be one of the following values: LL_RNG_LFSR_MODE_59BIT LL_RNG_LFSR_MODE_128BIT

Definition at line 385 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_LFSR_SEED_SEL | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  Returned | value can be one of the following values: LL_RNG_SEED_FR0_S0 LL_RNG_SEED_USER

Definition at line 342 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_OUT_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  Returned | value can be one of the following values: LL_RNG_OUTPUT_FR0_S0 LL_RNG_OUTPUT_CYCLIC_PARITY LL_RNG_OUTPUT_CYCLIC LL_RNG_OUTPUT_LFSR_RNG LL_RNG_OUTPUT_LFSR

Definition at line 481 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_POST_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  Returned | value can be one of the following values: LL_RNG_POST_PRO_NOT LL_RNG_POST_PRO_SKIPPING LL_RNG_POST_PRO_COUNTING LL_RNG_POST_PRO_NEUMANN

Definition at line 432 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TSCON | RNG_TRDY_TIME | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  Between | Min_Time = 0 and Max_Time = 0xFF

Definition at line 520 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CTRL | RNG_RUN | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.

Return values

  State | of bit (1 or 0).

Definition at line 242 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_LFSR_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  mode | This parameter can be one of the following values: LL_RNG_LFSR_MODE_59BIT LL_RNG_LFSR_MODE_128BIT

Return values

  None |

Definition at line 364 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_LFSR_SEED_SEL | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  seed | This parameter can be one of the following values: LL_RNG_SEED_FR0_S0 LL_RNG_SEED_USER

Return values

  None |

Definition at line 321 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_OUT_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  mode | This parameter can be one of the following values: LL_RNG_OUTPUT_FR0_S0 LL_RNG_OUTPUT_CYCLIC_PARITY LL_RNG_OUTPUT_CYCLIC LL_RNG_OUTPUT_LFSR_RNG LL_RNG_OUTPUT_LFSR

Return values

  None |

Definition at line 457 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | CONFIG | RNG_POST_MODE | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  post | This parameter can be one of the following values: LL_RNG_POST_PRO_NOT LL_RNG_POST_PRO_SKIPPING LL_RNG_POST_PRO_COUNTING LL_RNG_POST_PRO_NEUMANN

Return values

  None |

Definition at line 409 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | TSCON | RNG_TRDY_TIME | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  time | range between 0x1 and 0xFF.

Return values

  None |

Definition at line 501 of file gr55xx_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.

\rst +-------------------—+--------------------------------—+ | Register | BitsName | +======================+===================================+ | USER | RNG_USER_SEED | +-------------------—+--------------------------------—+ \endrst

Parameters

  RNGx | RNG instance.
  seed | range between 0x1 and 0xFFFF.

Return values

  None |

Definition at line 541 of file gr55xx_ll_rng.h.