I think I've tried every bit combination to 37.1.3.3.2 TRNG0 Miscellaneous Control (TRNG0_MCTL). I've followed the datasheet, I just can't get it to work. Always with unclearable errors and bad frequency counter values, even though I leave them on default values.
I turn off the PRGM bit, I turn on TRNG_ACC, sometimes together, sometimes in that order, and sometimes the reverse. I've tried setting RST_DEF or FOR_SCLK before doing that. Nothing seems to work- always unclearable errors.
I've done it in C and I've done it from the debugger, nothing works.
I would appreciate any suggestions.
Default values in TRNG0_SDCTL, MCG, and TRNG0_FRQMAX produce an error on startup. Increase TRNG0_FRQMAX or reduce TRNG0_SDCTL to get around this. Example "Program flow" in TRM doesn't really do the complexity of the submodule justice.
Hi Andrew Pikul ,
Sorry for the late reply!
Have you try to refer the trng random example in SDK_2.2_FRDM-KL82Z?
You can download the SDK_2.2_FRDM-KL82Zpackage refer Generating a downloadable MCUXpresso SDK v.2 package.
And then the trng random example can be found in it's folder. (For example: C:\SDK_2.2_FRDM-KL82Z\boards\frdmkl82z\driver_examples\trng\random)
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks, I appreciate. Still getting used to using the SDK for proper implementation instead of the TRM.