Skip to content

Commit 1e7a13b

Browse files
jaz1-nordicrlubos
authored andcommitted
[nrf fromtree] arch: riscv: core: Enable RISCV IRQs for no multithreading
Enable MSTATUS.IEN to allow RISCV interrupts for non-multithreaded applications. Signed-off-by: Jakub Zymelka <[email protected]> (cherry picked from commit 502fcac)
1 parent 85665b2 commit 1e7a13b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/core/thread.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ FUNC_NORETURN void z_riscv_switch_to_main_no_multithreading(k_thread_entry_t mai
212212
main_stack = (K_THREAD_STACK_BUFFER(z_main_stack) +
213213
K_THREAD_STACK_SIZEOF(z_main_stack));
214214

215+
irq_unlock(MSTATUS_IEN);
216+
215217
__asm__ volatile (
216218
"mv sp, %0; jalr ra, %1, 0"
217219
:

0 commit comments

Comments
 (0)