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

[复制链接]
10403|28
 楼主| yaoyutaoTom 发表于 2016-3-8 14:52 | 显示全部楼层 |阅读模式
STM32F103RET6, swD下载, 第一次能烧写,第二次就不行了,什么原因
gowow 发表于 2016-3-8 16:32 | 显示全部楼层
程序里swd被禁掉了
qq4988 发表于 2016-3-8 16:46 | 显示全部楼层
楼上说的情况有可能,用串口下载程序改过来
yklstudent 发表于 2016-3-8 16:49 | 显示全部楼层
按住复位键直接烧录
e21008115 发表于 2016-3-8 20:09 | 显示全部楼层
进入低功耗模式也下载不了 ISP可以下
舒斯特尔 发表于 2016-3-8 20:21 | 显示全部楼层
第三次可以吗,还有楼主程序里实现了什么功能,用到了什么资源?
734774645 发表于 2016-3-8 22:03 | 显示全部楼层
你升级一下ST-LINK的固件试试看,也有可能是固件不够好。
xyz549040622 发表于 2016-3-9 07:20 来自手机 | 显示全部楼层
有可能你io操作了swd接口了
 楼主| yaoyutaoTom 发表于 2016-3-9 09:25 | 显示全部楼层
xyz549040622 发表于 2016-3-9 07:20
有可能你io操作了swd接口了

我的确操作了,JTAG的IO口,查了资料,解决方法如下,BOOT0接高电平,重新烧写,再重烧写,再将BOOT0接就好了。
airwill 发表于 2016-3-9 09:33 | 显示全部楼层
JTAG的IO口, 特别是 SWD 的 IO 口在还需要硬件仿真的时候, 先不要更改用作其它功能
jshengw 发表于 2016-3-9 10:49 | 显示全部楼层
小问题,调试口被你写成普通IO了,串口写回来就好了,8楼正解
HORSE7812 发表于 2016-3-9 11:15 | 显示全部楼层
huangcunxiake 发表于 2016-3-9 11:19 | 显示全部楼层
SWD这个结构,所有厂家的单片机都是一样的吗?
xiaofei558008 发表于 2016-3-9 12:43 | 显示全部楼层
配置一下RESET


xiaofei558008 发表于 2016-3-9 12:44 | 显示全部楼层
下面是IAR ST-Link配置咯,你把MCU NRST脚和仿真器连一起,怎么仿真都可以
Capture.PNG
zhoupxa 发表于 2016-3-9 13:56 | 显示全部楼层
学习了
Thethree 发表于 2016-3-9 14:16 | 显示全部楼层
你的程序是不是对swd的IO操作了啊
 楼主| yaoyutaoTom 发表于 2016-3-9 15:07 | 显示全部楼层
Thethree 发表于 2016-3-9 14:16
你的程序是不是对swd的IO操作了啊

对JTAG的其他口操作了,但是没对SWD的口操作,所以第一次能烧,第二次就不行了,这时,用上述的方法重新烧写,并在程序里加上GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); 就好了,谢谢大家了!总感觉坛时没有**人气好
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,也没用。真是没办法了。
chenyongand 发表于 2016-4-22 12:57 | 显示全部楼层
按住复位键就可以再次烧写
您需要登录后才可以回帖 登录 | 注册

本版积分规则

56

主题

96

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部