j-link -- CPU could not be halted;no sw-dp found;Too many errors to display

参考文档:https://blog.csdn.net/wuhuijun165/article/details/49622803

芯片:STM32F407ZET6

环境:KEIL开发环境

下载:JLINK V8仿真器

方式:VCC/GND/SWD/SWI四线仿真模式

故障:

          **JLink Warning: CPU could not be halted
          **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

网上有很多中说法,有说复位电路问题,换电阻、电容解决了的(阻容匹配不好引起的问题吗?);有换驱动版本解决的;有将复位设置成Core and Peripherals解决的;有说下载线太长的缘故;有说是BOOT0、BOOT1管脚的问题,一动BOOT1后就出现这些报错,有说降低速度解决的。也有解决办法:
 

j-link -- CPU could not be halted;no sw-dp found;Too many errors to display

 

最后,将下载线变短,问题解决了。

原来50cm线 更改为 10cm成功。