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

  RNGx | RNG instance.

Return values

  None |

Definition at line 215 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.

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

Parameters

  RNGx | RNG instance.

Return values

  None |

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

  RNGx | RNG instance.

Return values

  None |

Definition at line 200 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.

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

Parameters

  RNGx | RNG instance.

Return values

  None |

Definition at line 245 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.

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

Parameters

  RNGx | RNG instance.

Return values

  State | of bit (1 or 0).

Definition at line 275 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.

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

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 345 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.

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

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 310 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.

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

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 425 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.

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

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 384 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.

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

Parameters

  RNGx | RNG instance.

Return values

  Between | Min_Time = 0 and Max_Time = 0xFF

Definition at line 456 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.

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

Parameters

  RNGx | RNG instance.

Return values

  State | of bit (1 or 0).

Definition at line 230 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.

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

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 328 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.

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

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 293 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.

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

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 405 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.

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

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 365 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.

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

Parameters

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

Return values

  None |

Definition at line 441 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.

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

Parameters

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

Return values

  None |

Definition at line 473 of file gr55xx_ll_rng.h.