complete IRQ setup
This commit is contained in:
@@ -11,9 +11,10 @@ int main() {
|
||||
// board_init();
|
||||
_init();
|
||||
puts("after _init");
|
||||
|
||||
// avoid getting interrupt upon enabling MIP/MIE_MTI
|
||||
set_aclint_mtimecmp(aclint, 0xffffffffffffffff);
|
||||
// enable global interrupt
|
||||
// csr_set_bits_mstatus(MSTATUS_MIE_BIT_MASK);
|
||||
csr_set_bits_mstatus(MSTATUS_MIE_BIT_MASK);
|
||||
|
||||
puts("after enable MSTATUS_MIE/MPP");
|
||||
// enable MIE
|
||||
@@ -26,7 +27,7 @@ int main() {
|
||||
time = get_aclint_mtime(aclint);
|
||||
printf("in main() get_aclint_mtime after set 9, return %lu \n ", (uint32_t)time);
|
||||
|
||||
set_aclint_mtimecmp(aclint, (time + 3));
|
||||
set_aclint_mtimecmp(aclint, (time + 300));
|
||||
puts("set mtimecmp");
|
||||
|
||||
uint64_t timecmp = get_aclint_mtimecmp(aclint);
|
||||
|
||||
Reference in New Issue
Block a user