26.8.1.2.2 Workflow

  1. Make the application loop infinitely.
    while (true) {
    
  2. Start to read a random data from TRNG until success.
    while (trng_read(&trng_instance, &random_result) != STATUS_OK) {
    }
    
  3. Toggle the board LED to indicate a random data is read.
    port_pin_toggle_output_level(LED_0_PIN);
    /* Add a short delay to see LED toggle */
    volatile uint32_t delay = 50000;
    while(delay--) {
    }