userInterruptDemo Example
The user interrupt example (userInterruptDemo directory) uses one bit from an APB3 slave peripheral as an interrupt signal to RISC-V processor. The main routine sets up an interrupt routine, then triggers an interrupt signal to the user interrupt port by programming bit 2 on the ABP3 slave to high.
When the RISC-V processor receives the interrupt signal, program execution jumps from the main routine to the interrupt (or priority) routine. The interrupt routine sets bit 2 low so the processor can leave the interrupt routine.
The application displays the messages on a UART
terminal:
User Interrupt Demo, waiting for user interrupt...
Entered User Interrupt Routine
Turn off Interrupt Signal
Leaving User Interrupt Routine