Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TRNG Example

Purpose

This example demonstrates the True Random Number Generator (TRNG) provided on SAM microcontroller. It enables the user to enable TRNG to generate random values every 84 Clock Cycles.

Requirements

This package can be used with SAM evaluation kits.

Description

When launched, this program displays generated random values on the terminal.

Usage

  1. Build the program and download it into the evaluation board.
  2. On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 bits of data
    • No parity
    • 1 stop bit
    • No flow control
  3. Start the application.
  4. In the terminal window, the following text should appear:
    -- TRNG Example --
    -- xxxxxx-xx
    -- Compiled: xxx xx xxxx xx:xx:xx --
    Random Value: xxxx