Random numbers

HAL_RNG_GetRandomNumber()

// PROTOTYPE
uint32_t HAL_RNG_GetRandomNumber(void);

Gets a cryptographic random number (32-bit) from the hardware random number generator.

Note: The hardware random number generator has a limit to the number of random values it can produce in a given timeframe. If there aren't enough random numbers available at this time, this function may be block until there are. If you need a large number of random values you can use this function to seed a pseudo-random number generator (PRNG).

Note: This is not available on the Spark Core, but is available on all Gen 2, Gen 3, and Gen 4 devices.