26.8.1.1.2 Code
Copy-paste the following set up code to your user application:
Add to user application initialization (typically the start of main()):/* TRNG module software instance (must not go out of scope while in use) */staticstructtrng_module trng_instance;voidconfigure_trng(void){/* Create a new configuration structure for the TRNG settings* and fill with the default module settings. */structtrng_config config_trng;trng_get_config_defaults(&config_trng);/* Alter any TRNG configuration settings here if required *//* Initialize TRNG with the user settings */trng_init(&trng_instance, TRNG, &config_trng);}
system_init();configure_trng();trng_enable(&trng_instance);
