This demo (clintTimerInterruptDemo directory) shows how to use the core timer and its interrupt function. This demo configures the core timer for software interrupt and timer interrupt using CLINT driverwhere both interrupt triggered at different period. It prints messages on a terminal when the SoC is interrupted by the core timer.
For more detail of the driver, refer to Clint Timer Driver.
Newlib
By default, newlib-nano is used for this demo.
- See also
- User Debug Configuration - To learn more about User Debug Configuration.
Execution Sequence:
The following shows the expected execution sequence:
Starting Clint Timer Interrupt Demo>
Software Interrupt Triggered!
Entering ISR routine
Count:0 .. Done
Timer Interrupt Triggered!
Entering ISR routine
Count:0 .. Done
Timer Interrupt Triggered!
Entering ISR routine
Count:1 .. Done
Software Interrupt Triggered!
Entering ISR routine
Count:1 .. Done
Timer Interrupt Triggered!
Entering ISR routine
Count:2 .. Done
Timer Interrupt Triggered!
Entering ISR routine
Count:3 .. Done
Timer Interrupt Triggered!
Entering ISR routine
Count:4 .. Done
Software Interrupt Triggered!
Entering ISR routine
Count:2 .. Done