nRF5 SDK v11.0.0
Random Number Generator Example

The Random Number Generator Example demonstrates the use of the RNG driver by obtaining a vector of random numbers and printing the numbers in a COM listener (for example PUTTY) using UART.

The application starts by configuring app_uart and the RNG driver. The main loop prints the vector of random numbers and waits for 100 milliseconds.

You can find the source code and project file of the example in the following folder: <InstallFolder>\examples\peripheral\rng

Testing

Test the Random Number Generator Example application by performing the following steps:

  1. Compile and program the application.
  2. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 115.200
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: RTS/CTS
  3. Observe that a vector of random numbers is output every 100 milliseconds.

Documentation feedback | Developer Zone | Updated