diff --git a/NMSIS/Core/Include/core_feature_base.h b/NMSIS/Core/Include/core_feature_base.h index 79f36cdc..bfbea599 100644 --- a/NMSIS/Core/Include/core_feature_base.h +++ b/NMSIS/Core/Include/core_feature_base.h @@ -219,8 +219,8 @@ typedef union { */ typedef union { struct { - rv_csr_t mdcause:2; /*!< bit: 0..1 More detailed exception information as MCAUSE supplement */ - rv_csr_t _reserved0:__RISCV_XLEN-2; /*!< bit: 2..XLEN-1 Reserved */ + rv_csr_t ptyp:3; /*!< bit: 0..2 More detailed exception information as MCAUSE supplement */ + rv_csr_t _reserved0:__RISCV_XLEN-3; /*!< bit: 3..XLEN-1 Reserved */ } b; /*!< Structure used for bit access */ rv_csr_t d; /*!< Type used for csr data access */ } CSR_MDCAUSE_Type; diff --git a/NMSIS/Core/Include/riscv_encoding.h b/NMSIS/Core/Include/riscv_encoding.h index e1210145..e84c0a1b 100644 --- a/NMSIS/Core/Include/riscv_encoding.h +++ b/NMSIS/Core/Include/riscv_encoding.h @@ -226,7 +226,8 @@ #define MSUBM_PTYP (0x3<<8) #define MSUBM_TYP (0x3<<6) -#define MDCAUSE_MDCAUSE (0x3) +#define MDCAUSE_MDCAUSE (0x7) +#define MDCAUSE_PTYP (0x7) #define MMISC_CTL_LDSPEC_ENABLE (1<<12) #define MMISC_CTL_SIJUMP_ENABLE (1<<11)