I have K82 BusClock 48 Mhz and with this clock I try to use TRNG in way like in SDK example.
Initialization is OK but GetRandomData is always return error.
/* Set sample mode of the TRNG ring oscillator to Von Neumann, for better random data.
* It is optional.*/
trngConfig.sampleMode = kTRNG_SampleModeVonNeumann;
/* Initialize TRNG */
status = TRNG_Init(TRNG0, &trngConfig);
I have reduced clock divider from default to 2,4,or kTRNG_RingOscDiv8
trngConfig.ringOscDiv = TRNG_USER_CONFIG_DEFAULT_OSC_DIV; // 0 -> 2,4,8
and GetRandomData start to return OK status and some random data.
I have taken data by 4 byte chunks and always last 3 bytes are equal,
like 0x68 0x35 0x35 0x35
So I think I need better configuration for TRNG block.
Could you suggest configuration values what make TRNG faster and more random ?