2021-04-11 17:27:48 +00:00
|
|
|
#include "flute_system.h"
|
|
|
|
#include "soc_peripherals.h"
|
|
|
|
|
2021-04-12 18:23:31 +00:00
|
|
|
__attribute__((interrupt)) void Default_IRQHandler(void) {
|
|
|
|
for(;;) {
|
|
|
|
//
|
|
|
|
}
|
2021-04-11 17:27:48 +00:00
|
|
|
}
|
|
|
|
|
2021-04-12 18:23:31 +00:00
|
|
|
__attribute__((interrupt)) void Timer_IRQHandler(void) {
|
|
|
|
SysTick++;
|
2021-04-11 17:27:48 +00:00
|
|
|
|
2021-04-12 18:23:31 +00:00
|
|
|
uint64_t *mtimecmp = (uint64_t *)(CLINT_BASE + 0x4000);
|
|
|
|
uint64_t *mtime = (uint64_t *)(CLINT_BASE + 0xBFF8);
|
|
|
|
|
|
|
|
*mtimecmp = *mtime + SYS_TICK_STEP; // Interrupt flag will be cleared by a write to MTIMECMP.
|
2021-04-11 17:27:48 +00:00
|
|
|
}
|