用jlink可以下载程序,可是在线仿真的时候总是出现:
***JLink Error: Could not start CPU core. (ErrorCode: -1)
**JLink Warning: CPU could not be halted
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
。。。。。。
最后发现是在程序里调用了
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
禁用了JTAG。
本文探讨了使用JLink进行在线仿真时遇到的CPU启动失败、无法暂停及寄存器读取错误等问题,并揭示了程序中禁用JTAG功能导致这些错误的原因。

5136

被折叠的 条评论
为什么被折叠?



