The latest development version of this page may be more current than this released 0.4.2 version.

RNG demo

Overview

Start a FreeRTOS task that runs an RNG (Random Number Generator) demo once.

The demo sequentially generates 5 32-bit true random numbers, 10 32-bit true random numbers, 5 16-bit pseudo-random numbers, and 10 16-bit pseudo-random numbers.

Requirements

The board which have a w80x chip.

Building and flashing

Example Location: examples/peripheral/rng

compile, burn, and more, see: get started

Running result

Successfully running will output the following logs

D/dt              [0.002] add device iflash
D/ptb             [0.002] partition table base 0xe000
D/ft              [0.002] ft_0 base 0, ft_1 base 1000
D/ft              [0.004] ft init 1
D/main            [0.004] boot reason 0
D/main            [0.004] heap size 273144(266.74KB)
D/main            [0.004] flash size 0x200000(2MB)
I/test            [0.006] rng demo.
D/dt              [0.006] add device rng
TRUE RNG out:0x00001964 0x00032C9D 0x0006593A 0x000CB274 0x00CB274A 
TRUE RNG out:0x6F8AF794 0xF8AF7942 0xE2BDE509 0x8AF79425 0x2BDE5095 0xAF794255 0x5EF284AB 0xF794255E 0x794255E1 0xCA12AF08 
PSEUDO RNG out:0x8A08 0x8A01 0x8C5D 0x47FA 0xA7E3 
PSEUDO RNG out:0xC337 0x91DC 0x3488 0x0681 0x4456 0x39C3 0x33FF 0x5A44 0x2035 0x80B2 
I/test            [0.010] rng demo.
I/test            [1.010] rng demo.
I/test            [2.010] rng demo.
I/test            [3.010] rng demo.