Characterization test program
You must implement the characterization test program, using the CC_TST_TRNG API that Arm supplies.
NoteUsually, for a memory-constrained IoT scenario, the collected raw data is redirected to a peripheral, to reduce memory usage. For a device without an available peripheral, you may utilize the max delay between blocks to design a private protocol to collect the data. The max delay between blocks follows this formula: max_delay = 4*(192 * SAMPLE_CNT/RNG_CLK).
Example of API
/** * Collect TRNG output for characterization * * @regBaseAddress: Base address of the TRNG registers in the memory map of the system. * @TRNGMode: 0 - 1st iteration; 1 - 2nd iteration, FE TRNG driver; 2 - 2nd iteration, 800-90B TRNG driver * @roscLength: The ID of the ring oscillator (0 to 3). * @sampleCount: The sampling rate of the ring oscillator. * @buffSize: The size of buffer passed in dataBuff_ptr. * @dataBuff_ptr: The buffer for storing the results. * * The output of the function is 0 if collection succeeds, or a non-zero * error code on failure. */ int CC_TST_TRNG( unsigned int regBaseAddress, unsigned int TRNGMode, unsigned int roscLength, unsigned int sampleCount, unsigned int buffSize, unsigned int *dataBuff_ptr);