From a8943a111f11efab12e0675239b1b5c25f332666 Mon Sep 17 00:00:00 2001 From: mariusmonton Date: Tue, 22 Jan 2019 19:31:13 +0100 Subject: [PATCH] enable interrupts writing to mstatus --- tests/C/timer/timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/C/timer/timer.c b/tests/C/timer/timer.c index c64621d..c4c9ab2 100644 --- a/tests/C/timer/timer.c +++ b/tests/C/timer/timer.c @@ -33,6 +33,9 @@ void register_timer_isr() { asm volatile("csrw mtvec, t0"); asm volatile("li t1, 0x888"); asm volatile("csrw mie, t1"); + + // enable interrupts + asm volatile( "csrs mstatus,1" ); } int main(void) {