The MCUXpresso SDK provides a peripheral driver for the Random Number generator module of MCUXpresso SDK devices.
RNG return status types RNG operating modes
Enumerator |
---|
trng_UpdateOnce |
TRNG update once & disable.
|
trng_FreeRunning |
TRNG updates continuously.
|
status_t TRNG_GetDefaultConfig |
( |
trng_config_t * |
userConfig | ) |
|
This function initializes the TRNG configuration structure.
- Parameters
-
userConfig | Pointer to TRNG configuration structure |
status_t TRNG_Init |
( |
RNG_Type * |
base, |
|
|
const trng_config_t * |
userConfig |
|
) |
| |
This function initializes the TRNG.
- Parameters
-
base | TRNG base address |
userConfig | The configuration of TRNG |
- Returns
- kStatus_Success - Success kStatus_InvalidArgument - Invalid parameter
void TRNG_Deinit |
( |
RNG_Type * |
base | ) |
|
This function shuts down the TRNG.
- Parameters
-
status_t TRNG_GetRandomData |
( |
RNG_Type * |
base, |
|
|
void * |
data, |
|
|
size_t |
data_size |
|
) |
| |
This function gets random data from the TRNG.
- Parameters
-
base | TRNG base address |
data | pointer to user buffer to be filled by random data |
data_size | size of data in bytes |
- Returns
- TRNG status