打印
[STM32F1]

SWD下载,第一次可以,第二次就不行了,什么原因?

[复制链接]
8110|28
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
STM32F103RET6, swD下载, 第一次能烧写,第二次就不行了,什么原因
沙发
gowow| | 2016-3-8 16:32 | 只看该作者
程序里swd被禁掉了

使用特权

评论回复
板凳
qq4988| | 2016-3-8 16:46 | 只看该作者
楼上说的情况有可能,用串口下载程序改过来

使用特权

评论回复
地板
yklstudent| | 2016-3-8 16:49 | 只看该作者
按住复位键直接烧录

使用特权

评论回复
5
e21008115| | 2016-3-8 20:09 | 只看该作者
进入低功耗模式也下载不了 ISP可以下

使用特权

评论回复
6
舒斯特尔| | 2016-3-8 20:21 | 只看该作者
第三次可以吗,还有楼主程序里实现了什么功能,用到了什么资源?

使用特权

评论回复
7
734774645| | 2016-3-8 22:03 | 只看该作者
你升级一下ST-LINK的固件试试看,也有可能是固件不够好。

使用特权

评论回复
8
xyz549040622| | 2016-3-9 07:20 | 只看该作者
有可能你io操作了swd接口了

使用特权

评论回复
9
yaoyutaoTom|  楼主 | 2016-3-9 09:25 | 只看该作者
xyz549040622 发表于 2016-3-9 07:20
有可能你io操作了swd接口了

我的确操作了,JTAG的IO口,查了资料,解决方法如下,BOOT0接高电平,重新烧写,再重烧写,再将BOOT0接就好了。

使用特权

评论回复
10
airwill| | 2016-3-9 09:33 | 只看该作者
JTAG的IO口, 特别是 SWD 的 IO 口在还需要硬件仿真的时候, 先不要更改用作其它功能

使用特权

评论回复
11
jshengw| | 2016-3-9 10:49 | 只看该作者
小问题,调试口被你写成普通IO了,串口写回来就好了,8楼正解

使用特权

评论回复
12
HORSE7812| | 2016-3-9 11:15 | 只看该作者

使用特权

评论回复
13
huangcunxiake| | 2016-3-9 11:19 | 只看该作者
SWD这个结构,所有厂家的单片机都是一样的吗?

使用特权

评论回复
14
xiaofei558008| | 2016-3-9 12:43 | 只看该作者
配置一下RESET


使用特权

评论回复
15
xiaofei558008| | 2016-3-9 12:44 | 只看该作者
下面是IAR ST-Link配置咯,你把MCU NRST脚和仿真器连一起,怎么仿真都可以

Capture.PNG (60.02 KB )

Capture.PNG

使用特权

评论回复
16
zhoupxa| | 2016-3-9 13:56 | 只看该作者
学习了

使用特权

评论回复
17
Thethree| | 2016-3-9 14:16 | 只看该作者
你的程序是不是对swd的IO操作了啊

使用特权

评论回复
18
yaoyutaoTom|  楼主 | 2016-3-9 15:07 | 只看该作者
Thethree 发表于 2016-3-9 14:16
你的程序是不是对swd的IO操作了啊

对JTAG的其他口操作了,但是没对SWD的口操作,所以第一次能烧,第二次就不行了,这时,用上述的方法重新烧写,并在程序里加上GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); 就好了,谢谢大家了!总感觉坛时没有**人气好

使用特权

评论回复
19
xiong2088| | 2016-4-22 10:34 | 只看该作者
本帖最后由 xiong2088 于 2016-4-22 10:44 编辑

我也碰到这个问题:
第二次烧录就显示这样:

Build target 'hanlanda_jiemaqi'
compiling gpio.c...
linking...
Program Size: Code=900 RO-data=268 RW-data=4 ZI-data=1636  
FromELF: creating hex file...
"..\OBJ\hanlanda_jiemaqi.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed:  00:00:03
Load "..\\OBJ\\hanlanda_jiemaqi.axf"
Set JLink Project File to "E:\chengxu\hanlanda_jiemaqi\USER\JLinkSettings.ini"
* JLink Info: Device "STM32F103C6" selected (32 KB flash, 10 KB RAM).

JLink info:
------------
DLL: V4.92 , compiled Sep 30 2014 09:33:42
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N : 20160130
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull

* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: Found Cortex-M3 r1p1, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: TPIU fitted.
ROMTableAddr = 0xE00FF003
**JLink Warning: S_RESET_ST not cleared
**JLink Warning: CPU did not halt after reset.
**JLink Warning: CPU could not be halted
* JLink Info: Core did not halt after reset, trying to disable WDT.
**JLink Warning: CPU did not halt after reset.
**JLink Warning: CPU could not be halted
**JLink Warning: S_RESET_ST not cleared
* JLink Info: Found SWD-DP with ID 0x1BA01477
* JLink Info: Found Cortex-M3 r1p1, Little endian.
**JLink Warning: S_RESET_ST not cleared
**JLink Warning: CPU did not halt after reset.
**JLink Warning: CPU could not be halted
* JLink Info: Core did not halt after reset, trying to disable WDT.
**JLink Warning: CPU did not halt after reset.
**JLink Warning: CPU could not be halted
**JLink Warning: S_RESET_ST not cleared
**JLink Warning: CPU could not be halted
Error: Flash Download failed  -  Target DLL has been cancelled
Flash Load finished at 10:29:53


请各位大神指点!

STM32F103C6,SWD烧录。没有操作JTAG的IO口,BOOT1的口也没有操作。SWD的速度也试过200K,也没用。真是没办法了。

使用特权

评论回复
20
chenyongand| | 2016-4-22 12:57 | 只看该作者
按住复位键就可以再次烧写

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

56

主题

96

帖子

2

粉丝