ESP8266/ESP32: Exception Causes 参考

简介

xtensa ISA(指令集架构) 参考文档中, 描述了:
将执行重定向到一个常规异常向量 (userExceptionVectorkernelExceptionVectordoubleExceptionVector) 的异常之后, EXCCAUSE 寄存器将包含一个值, 该值指定上次异常的原因. CPU 重置后, EXCCAUSE 将处于未定义状态.

下图为 EXCCAUSE 寄存器的比特位数显示.
在这里插入图片描述

异常原因 (Exception Causes)

EXCCAUSE Code
( EXCCAUSE 寄存器最后 6-bit 值)
Cause NameCause Description [Required Option]EXCVADDR Loaded
0IllegalInstructionCauseIllegal instruction [Exception Option]No
1SyscallCauseSYSCALL instruction [Exception Option]No
2InstructionFetchErrorCauseProcessor internal physical address or data error during instruction fetch [Exception Option]Yes
3LoadStoreErrorCauseProcessor internal physical address or data error during load or store [Exception Option]Yes
4Level1InterruptCauseLevel-1 interrupt as indicated by set level-1 bits in the INTERRUPT register [ Interrupt Option ]No
5AllocaCauseMOVSP instruction, if caller’s registers are not in the register file [ Windowed Register Option]No
6IntegerDivideByZeroCauseQUOS, QUOU, REMS, or REMU divisor operand is zero [ 32-bit Integer Divide Option]No
7/Reserved for Tensilica/
8PrivilegedCauseAttempt to execute a privileged operation when CRING ≠ 0 [MMU Option]No
9LoadStoreAlignmentCauseLoad or store to an unaligned address [Unaligned Exception Option]Yes
10…11/Reserved for Tensilica/
12InstrPIFDataErrorCausePIF data error during instruction fetch [Processor Interface Option]Yes
13LoadStorePIFDataErrorCauseSynchronous PIF data error during LoadStore access [Processor Interface Option]Yes
14InstrPIFAddrErrorCausePIF address error during instruction fetch [Processor Interface Option]Yes
15LoadStorePIFAddrErrorCauseSynchronous PIF address error during LoadStore access [Processor Interface Option]Yes
16InstTLBMissCauseError during Instruction TLB refill [MMU Option]Yes
17InstTLBMultiHitCauseMultiple instruction TLB entries matched [MMU Option]Yes
18InstFetchPrivilegeCauseAn instruction fetch referenced a virtual address at a ring level less than CRING [MMU Option]Yes
19/Reserved for Tensilica/
20InstFetchProhibitedCauseAn instruction fetch referenced a page mapped with an attribute that does not permit instruction fetch [Region Protection Option or MMU Option]Yes
21…23/Reserved for Tensilica/
24LoadStoreTLBMissCauseError during TLB refill for a load or store [MMU Option]Yes
25LoadStoreTLBMultiHitCauseMultiple TLB entries matched for a load or store [MMU Option]Yes
26LoadStorePrivilegeCauseA load or store referenced a virtual address at a ring level less than CRING [MMU Option]Yes
27/Reserved for Tensilica/
28LoadProhibitedCauseA load referenced a page mapped with an attribute that does not permit loads [Region Protection Option or MMU Option]Yes
29StoreProhibitedCauseA store referenced a page mapped with an attribute that does not permit stores [Region Protection Option or MMU Option]Yes
30…31/Reserved for Tensilica/
32…39CoprocessornDisabledCoprocessor n instruction when cpn disabled. n varies 0…7 as the cause varies 32…39 [Coprocessor Option]No
40…63/Reserved for Tensilica/
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值