/** * \brief Interrupt handler for the TRNG. * * Display the random value on the terminal. */ void TRNG_Handler(void) { uint32_t status; status = trng_get_interrupt_status(TRNG); if ((status & TRNG_ISR_DATRDY) == TRNG_ISR_DATRDY) { printf("-- Random Value: %x --\n\r", trng_read_output_data(TRNG)); } }
/** * \brief Interrupt handler for the TRNG. * * Display the random value on the terminal. */ void TRNG_Handler(void) { volatile uint32_t status; status = trng_get_interrupt_status(TRNG); if ((status & TRNG_ISR_DATRDY) == TRNG_ISR_DATRDY) { trng_int_flag = 1; trng_disable_interrupt(TRNG); } }