Supervisor Cause Register (scause): 0x142

The scause register is a 32-bit read-write register. When a trap is taken into S-mode, scause is written with a code indicating the event that caused the trap. Otherwise, scause is never written by the implementation, though it may be explicitly written by software.

31 30 0
Interrupt Exception Code
Bits Field Description Single/Multi-Core w/FPU w/MMU
0-30 Exception code See Table 1. N/A N/A Read
31 Interrupt scause interrupt bit. N/A N/A Read
Table 1. Machine Cause Register (scause) Values after Trap
Interrupt Exception Code Description
1 0 Reserved.
1 1 Supervisor software interrupt.
1 2-4 Reserved.
1 5 Supervisor timer interrupt.
1 6-8 Reserved.
1 9 Supervisor external interrupt.
1 10-15 Reserved.
0 0 Instruction address misaligned.
0 1 Instruction access fault.
0 2 Illegal instruction.
0 3 Breakpoint.
0 4 Load address misaligned.
0 5 Load access fault.
0 6 Store/AMO address misaligned.
0 7 Store/AMO access fault.
0 8 Environment call from U-mode.
0 9 Environment call from S-mode.
0 10 Reserved.
0 11 Environment call from M-mode.
0 12 Instruction page fault.
0 13 Load page fault.
0 14 Reserved.
0 15 Store/AMO page fault.
0 ≥16 Reserved.