mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/riscv_fix_vector_mcause_v4.4' into 'release/v4.4'
RISC-V: fix usage of special register when interrupts are enabled (backport v4.4) See merge request espressif/esp-idf!16187
This commit is contained in:
commit
aa96a98c0c
@ -268,7 +268,7 @@ _interrupt_handler:
|
||||
|
||||
/* call the C dispatcher */
|
||||
mv a0, sp /* argument 1, stack pointer */
|
||||
csrr a1, mcause /* argument 2, interrupt number */
|
||||
mv a1, s1 /* argument 2, interrupt number (mcause) */
|
||||
/* mask off the interrupt flag of mcause */
|
||||
li t0, 0x7fffffff
|
||||
and a1, a1, t0
|
||||
@ -276,7 +276,7 @@ _interrupt_handler:
|
||||
|
||||
/* After dispatch c handler, disable interrupt to make freertos make context switch */
|
||||
|
||||
la t0, 0x8
|
||||
li t0, 0x8
|
||||
csrrc t0, mstatus, t0
|
||||
|
||||
/* restore the interrupt threshold level */
|
||||
|
Loading…
Reference in New Issue
Block a user