Webcentive RISC-V Reference

scause

Supervisor trap cause

Address
0x142
Group
Supervisor-level CSRs
Privilege
SRW (privileged spec CSR listing, Supervisor Trap Handling)
Access
read/write; lowest privilege S (supervisor)
Address range
Standard read/write
Name in riscv-unified-db
Supervisor Cause

Privileged spec: Supervisor trap cause

Description

Reports the cause of the latest exception.

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
INTRV32 31 / RV64 63RW-RH

Written by hardware when a trap is taken into S-mode.

When set, the last exception was caused by an asynchronous Interrupt.

scause.INT is writable.

If scause is written with an undefined cause (combination of scause.INT and scause.CODE), an Illegal Instruction exception occurs.

If scause is written with an undefined cause (combination of scause.INT and scause.CODE), neither scause.INT nor scause.CODE are modified.

CODERV32 30-0 / RV64 62-0RW-RH

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages