This is the documentation for the latest (main) development branch of HPM SDK. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

6.22. PLIC

6.22.1. Overview

The PLIC example uses ptpc/gpio/plicsw interrupts to shows interrupt nesting function.

ptpc isr will not finish until gpio interrupt is triggered 5 times. Meanwhile in gpio isr, software interrupt will be triggered as well.

6.22.2. Board Setting

No special settings are required

6.22.3. Running the example

Running the example, interrupt nesting will occur when pressing GPIO button (please check Button section of specific board) according to the log prompt. The following message is displayed in the terminal:

Machine mode (Vector Preemptive) interrupt test
Press button will trigger GPIO interrupt, in which software interrupt will be triggered as well.
ptpc interrupt start
+ now next 5 gpio interrupts will occur in nested irq context
gpio interrupt start
plicsw start
plicsw end
gpio interrupt end