STM32 JLINK 用SW口调试出现问题(可以连接板子但是无法下载),用JTAG不会有问题
有时候能下载有时候就不行!连接使用4根线:
VCC
GND
P13
P14
可以连接到板子
http://cache.amobbs.com/bbs_upload782111/files_35/ourdev_602841VC4L5W.JPG
(原文件名:22.JPG)
下载出现问题:
http://cache.amobbs.com/bbs_upload782111/files_35/ourdev_602844IBXSKO.JPG
(原文件名:11.JPG)
Build target 'Target 1'
linking...
Program Size: Code=17396 RO-data=704 RW-data=124 ZI-data=2820
FromELF: creating hex file...
"..\List\ADC.axf" - 0 Error(s), 0 Warning(s).
Load "..\\List\\ADC.AXF"
JLink info:
-----------
DLL: V4.11i, compiled Jan 28 2010 19:55:25
Firmware: J-Link ARM V8 compiled Dec1 2009 11:42:48
Hardware: V8.00
S/N : 68000019
Feature(s) : RDI, FlashDL, FlashBP, JFlash, GDBFull
---
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
Target info:
------------
Device: STM32F103C8
VTarget = 3.242V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 1
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
Hardware-Breakpoints: 6
Software-Breakpoints: 2048
Watchpoints: 4
JTAG speed: 200 kHz
---
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
***JLink Error: Can not read register 15 (R15), CPU may not be halted
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
***JLink Error: Can not read register 20 (CFBP), CPU may not be halted
**JLink Warning: Could not read memory location 0x20000000 when trying to set soft RAM BP
Cannot setup Breakpoint at Address
***JLink Error: Can not read register 20 (CFBP), CPU may not be halted
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Erase Failed! 我也遇到类似问题,帮顶 没接复位,似乎 同问.是不是芯片坏了? 复位选择SYSRESETREQ
还有在DOWNLOAD TO FLASH 前打钩
估计这样就可以了。 TO 【3楼】 skoo
芯片没有坏我现在只能用串口ISP
TO【4楼】 cyxavr 又一天
照你的设置还是不行 ,上图
http://cache.amobbs.com/bbs_upload782111/files_35/ourdev_603103GLG6K9.JPG
(原文件名:1.JPG)
http://cache.amobbs.com/bbs_upload782111/files_35/ourdev_603104ECT32U.JPG
(原文件名:2.JPG)
http://cache.amobbs.com/bbs_upload782111/files_35/ourdev_603106X7RLLL.jpg
(原文件名:3.jpg)
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
Target info:
------------
Device: STM32F103C8
VTarget = 3.242V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 1
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
Hardware-Breakpoints: 6
Software-Breakpoints: 2048
Watchpoints: 4
JTAG speed: 200 kHz
---
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Erase Failed! 自己顶一下 请检查是否把3.3V接到了JTAG的一脚 【7楼】 b260123292
请检查是否把3.3V接到了JTAG的一脚
_____________________________--
3.3V没有的
【8楼】 topdreams 长风破浪
ba rst 引过来看看
------------------------
可以试一下 先用 jflasher 把 flash 擦除, 然后在测试看看 复位的问题,只接个电阻和电容就好了,原来遇到过此类问题 mark 【11楼】 pldjn
怎么连接? rest 脚上接? 自己顶一下 回复【15楼】shotstar无缘流星
-----------------------------------------------------------------------
和楼主一样的问题,也是C8的片子,提示**JLink Warning: CPU could not be halted寻求解决中,另外就是ZE的片子SW连接没问题,Jtag死活连不上,郁闷中。 希望 碰到过的帮忙一下 回复【16楼】haozi_1989
-----------------------------------------------------------------------
继续观望中,谈谈今天的进展,今天重新焊了一块板子,竟然是可以的,但是发现非常不稳定,使用sW好几次才能下载进去一次,而且芯片复位不正常,按10次复位按键有三次不能复位,吧复位电容换成103的也不行,而同样的电路在ZET6的片子上却完全没有问题。表示很郁闷。 Error: Flash Download failed - "Cortex-M3"终极答案:
芯片被加密,请用串口方式或通用编程器擦空芯片即可解决。 19楼】 skoo
现在都是用串口下载的 用串口擦空过芯片也不行
【18楼】 haozi_1989
跟你一样新焊接的有些可以但是 很不稳定 我用的是BHS STM32开发板,板子自带JLINKV7,刚才试过了,SW方式仿真和下载都正常。 【21楼】 hujian228
你连接了几根线啊 mark 持续关注,楼主最终解决没有? 回复【20楼】shotstar无缘流星
-----------------------------------------------------------------------
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=4502079&bbs_page_no=1&search_mode=3&search_text=haozi_1989&bbs_id=9999
我的问题总结了一些,觉得这问题出的还是有点诡异的,继续探索中。 确认你的VCC是接到JTAG的1号脚? 【26楼】 b260123292
确认你的VCC是接到JTAG的1号脚?
--------------------------------
VCC接了 看LZ位 换一个100脚的 stm32f103VB一模一样的电路 SW口 10M飞奔 很稳定 不知道什么原因 把时钟频率降低试试看 目前 c8用的是200k 以及比较低了 50k也试过 没用啊 ./emotion/em001.gif mark 晕死
我用SW下载,有时候好有时候坏
已经做了1K多套了
下好的程序再下都有可能下不了,多搞几次芯片都发烫
还有串口也时而能接收时而不工作,但是其他功能好的,串口发送都可以
后面的订单2K,都不敢做了
----------------------------------------------- 请问有人解决过这个问题吗?我也遇到同样的问题,菜鸟求助! 我的也是C8,500K以下的速度很稳定,高于500K就不行了,只接了VDD,GND,PA13,PA14;在ZE上同样的设置可以最大上到10M,实际下载时是4M。
http://cache.amobbs.com/bbs_upload782111/files_40/ourdev_646671CEIGQT.jpg
使用C8时SW设置截图 (原文件名:SW设置截图.jpg)
http://cache.amobbs.com/bbs_upload782111/files_40/ourdev_646672W9XDA5.jpg
使用ZE时SW设置截图 (原文件名:使用ZE时SW设置截图.jpg) mark,我也遇到了这样问题,不知道咋办啊! 遇到同样的问题
是PCB板上的 sw线太长, 降低速度到500k就可以了 我现在正是这样,不知是怎么回事,只是不能下载flash,我接的6线,用SW和JTAGE都是一样的. 回复【19楼】skoo
-----------------------------------------------------------------------
那用哪个工具可以解决呀, 同问,,一手关注,一手摸索。。。 也是这个问题的路过,求真相 mark 我也遇到刚解决了.我的是JlinkV8+3合1的STM32小板通过JTAG相连的.设置改成这样即可,其它任何都不用改.硬件也不用改任何东西.
http://cache.amobbs.com/bbs_upload782111/files_46/ourdev_686817QVBJ8B.jpg
(原文件名:QQ截图20111020235505.jpg) mark 关注 有帮助 顶 我只用了三条线,现在没发现问题 三条线?学习了,呵呵 焊接问题 看来SW不太稳定啊,暂时还是别用了,老老实实用JTAG吧 ⊙﹏⊙b汗,现在的人太浮躁了,自己的问题非说芯片问题。12楼说的很清楚了,是复位问题,只要用阻容复位电路就行了,非说SWD下载不稳定。 连接线的问题,如果是用的排线,GND在中间就不会有问题 我也是遇到了这样的问题,猜测是选择的速度太快了,降低频率试试就可以了。 我一直用四线SW,VET6,很稳定,你的是不是SW线长了。 恩
最近也是碰到了这个问题
速率大了 遇到同样问题:
JLink info:
------------
DLL: V4.15n, compiled Jun 18 2010 19:55:09
Firmware: J-Link ARM V8 compiled Sep 22 2011 16:23:23
Hardware: V8.00
S/N : 20100214
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
ROMTableAddr = 0xE00FF003
Target info:
------------
Device: STM32F103V8
VTarget = 3.306V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 1
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: TPIU fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
Hardware-Breakpoints: 6
Software-Breakpoints: 2048
Watchpoints: 4
JTAG speed: 1000 kHz
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Erase Failed!
好几天了,解决不了。请教各位高见...... 我也是,JTAG模式全正常,SWD模式能连接不能下载,怎么回事?? 点击AutoClk时,JLink灯都不亮了,半天才反应过来 没连接复位线,设置复位就设置成 normal就行,不要设置成 HW 把复位引脚上的上拉电阻去掉试一下SW能不能下载。 我也遇见过 jtag貌似真的比swd靠谱 JTAG一般用标准2×10插座,抗干扰能力会好一点。SW线少,在小板上一般是经过简化的,所以扁线要尽可能短一点,SW两根线两边用GND线包围,板上插口离CPU也要近一点。 4线,复位设置成Core and peripherals,用着挺好 我出现这问题,怎么回事啊?
Target info:
------------
Device: STM32F103ZE
VTarget = 3.287V
State of Pins:
TCK: 0, TDI: 1, TDO: 1, TMS: 0, TRES: 1, TRST: 1
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: Found SWD-DP with ID 0x1BA01477
**JLink Warning: No matching core found.
Hardware-Breakpoints: 0
Software-Breakpoints: 2048
Watchpoints: 0
JTAG speed: 4000 kHz
**JLink Warning: CPU could not be halted
* JLink Info: Program size too small. Flash download skipped.
***JLink Error: Can not read register 20 (CFBP) while CPU is running
**JLink Warning: CPU could not be halted
**JLink Warning: Could not read memory location 0x20000000 when trying to set soft RAM BP
***JLink Error: Could not start CPU core. (ErrorCode: -1)
Cannot setup Breakpoint at Address
***JLink Error: Can not read register 20 (CFBP) while CPU is running
**JLink Warning: CPU could not be halted
**JLink Warning: Could not read memory location 0x20000000 when trying to set soft RAM BP
***JLink Error: Could not start CPU core. (ErrorCode: -1)
Cannot setup Breakpoint at Address
Erase Failed! 出同样问题的路过,仍未找到原因、、、 这个必须mark下 pldjn 发表于 2010-12-13 14:57 static/image/common/back.gif
复位的问题,只接个电阻和电容就好了,原来遇到过此类问题
能说清楚一些吗? fkepdcjgd 发表于 2011-9-20 15:14 static/image/common/back.gif
我现在正是这样,不知是怎么回事,只是不能下载flash,我接的6线,用SW和JTAGE都是一样的. ...
JLINK 第1引脚 必须接3.3V RST还是要接的....VCC可以不接....要不每次下载都得手动按复位....
SW的线可以长...如果是排线或是手捆线...多几个地线....
如果不是建议用USB线或网线...
排线能到80cm...正在用.... 我也出现了同样的问题.
跟复位的设置有关.
把 JTAG,Setting,Debug中的reset设成"Normal"就解决了. 我也遇到这个问题,芯片肯定没有损坏。不要贸然更换芯片,虽然更换后能能够解决。
上面有位兄弟说的对,设置为串口BOOTLOADER启动,用串口ISP写一次就搞定了。 出现同样的问题,仍然找不到原因,希望有大神给指点迷津 楼主,最后怎么解决的啊
我也出现类似错误,两天了,下不了软件,中秋节都没心情了。。。 RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable , ENABLE);
楼主的程序里有没有这句话啊? 出现和楼主一样的问题,降低速度后可以下载了 换个驱动版本 或者软件 我以前也遇过 就这样解决了
zchong 发表于 2012-9-23 22:19
4线,复位设置成Core and peripherals,用着挺好
按你的建议试了,问题解决了. 刚试了以下用jlink的1、5、7、20脚分别对应接上即可 500khz高了就不行就是这种错误 刚试了以下用jlink的1、5、7、20脚分别对应接上即可 500khz高了就不行就是这种错误 复位脚是要接的 否者就这样 还有不能进中断仿真。 解决方法:
我做项目时也出现此情况:
**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
***JLink Error: Can not read register 0 (R0) while CPU is running
***JLink Error: Can not read register 1 (R1) while CPU is running
***JLink Error: Can not read register 2 (R2) while CPU is running
***JLink Error: Can not read register 3 (R3) while CPU is running
***JLink Error: Can not read register 4 (R4) while CPU is running
***JLink Error: Can not read register 5 (R5) while CPU is running
***JLink Error: Can not read register 6 (R6) while CPU is running
***JLink Error: Can not read register 7 (R7) while CPU is running
***JLink Error: Can not read register 8 (R8) while CPU is running
***JLink Error: Can not read register 9 (R9) while CPU is running
***JLink Error: Can not read register 10 (R10) while CPU is running
***JLink Error: Can not read register 11 (R11) while CPU is running
***JLink Error: Can not read register 12 (R12) while CPU is running
***JLink Error: Can not read register 13 (R13) while CPU is running
***JLink Error: Can not read register 14 (R14) while CPU is running
***JLink Error: Can not read register 15 (R15) while CPU is running
楼上各位方法我都试了,都是无效的。因为硬件和硬件设置都没问题。这个电路和设置做过几个产品了,但每次都都有意避开BOOT0与BOOT1引脚,
这次因PCB时就近用了BOOT1并初始化,只要操作BOOT1就会出现上述情况。
mark!!! 学习了。 标记一下 复位电路问题 zhourdev 发表于 2014-1-18 10:42
按你的建议试了,问题解决了.
这招有效!又一次被画PCB的给坑了,还以为软件问题。昨天好好地,今天死活就不是无法下载无法仿真!!!!!!! 遇到同样的问题,还没有解决。。。 我也遇到这个问题,我用V12隔离版本,下载程序时,也出去这个问题, 但我用V9 是正常的频率2M,也没找到原因
页:
[1]