This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/MSP432E401Y:CAN#39;t 获取 CPU PC/ LR 寄存器值、例外

Guru**** 3040470 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/867863/ccs-msp432e401y-can-t-get-cpu-pc-lr-register-value-at-exception

器件型号:MSP432E401Y

工具/软件:Code Composer Studio

无法获取 CPU PC/ LR 寄存器值例外

syscfg 文件中的配置:

 m3Hwi.enableException = false;
 m3Hwi.exHandlerFunc ="&execHandlerHook";

使用以下功能:

volatile uintptr_t * excpc = 0;
volatile uintptr_t * excCaller = 0;
void execHandlerHook (Hwi_ExcelContext * ctx)
{
EXPC =(uintptr_t*) ctx->PC; //发生异常的程序计数器
当发生异常时,激发调用方=(uintptr_t*) ctx->lr;//链接寄存器

while (2);
}

获得的 EXPC 和 EXCIT调用 方无法确认发生异常的位置。

观察到的值:
姓名:*(excPC)
默认值:2817851392
十六进制:0xA7F50000
十进制数:2817851392
八进制:024775200000
二进制:101001111101000000000000b

姓名:励超
默认值:0x00000000
十六进制:0x00000000
十进制:0
八进制:00
二进制:00000000000000000000000000000000b


是否有任何方法可以找到异常发生的位置?