记一次STM32F3单片机无法下程序解决方法

不知道什么操作导致keil5下载STM32F3的程序时报以下错误:


JLink info:
------------
DLL: V4.90 , compiled Jul 28 2014 10:35:20
Firmware: J-Link OB-STM32F072-CortexM compiled Mar  8 2020 11:15:54
Hardware: V1.00
Feature(s) : GDB, RDI, FlashBP, FlashDL, JFlash, RDDI 
 
* JLink Info: Found SWD-DP with ID 0x2BA01477
* JLink Info: Found Cortex-M4 r0p1, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: TPIU fitted.
* JLink Info: ETM fitted.
ROMTableAddr = 0xE00FF003
**JLink Warning: Could not set S_RESET_ST
**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: Could not set S_RESET_ST
* JLink Info: Found SWD-DP with ID 0x2BA01477
* JLink Info: Found Cortex-M4 r0p1, Little endian.
**JLink Warning: Could not set S_RESET_ST
**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: Could not set S_RESET_ST
**JLink Warning: CPU could not be halted
Error: Flash Download failed  -  Target DLL has been cancelled
Flash Load finished at 14:40:01

 

错误原因:芯片进入休眠状态,故无法下载程序。

解决办法:硬件上电前,先将复位脚与3.3v短接,然后上电,点击下载,同时断开复位脚与3.3v,即可下载成功。亲测可用!

 

引用\[1\]和\[2\]中提到了在使用Jlink V8调试FL2440时,执行setpc 0命令时出现了"CPU is not halted!"的错误提示。这个错误提示意味着CPU没有停止运行,导致无法执行相应的调试操作。可能的原因是JTAG连接不稳定或者芯片的硬件问题。为了解决这个问题,可以尝试以下几个步骤: 1. 检查JTAG连接:确保JTAG连接器正确插入,并且连接稳定。可以尝试重新插拔JTAG连接器,或者更换连接器来排除连接问题。 2. 检查芯片硬件:确保芯片的硬件电路没有问题。可以检查供电电压、时钟信号等是否正常。如果可能的话,可以尝试使用其他芯片进行调试,以确定是否是芯片本身的问题。 3. 更新调试工具驱动:如果使用的是Jlink调试工具,可以尝试更新Jlink驱动到最新版本。有时候旧版本的驱动可能存在一些问题,更新到最新版本可能会解决一些兼容性问题。 4. 检查调试工具设置:确保调试工具的设置正确。可以检查调试工具的配置文件,确认是否有错误的设置或者缺少必要的配置。 总结起来,"CPU is not halted!"错误提示可能是由于JTAG连接不稳定、芯片硬件问题、调试工具驱动问题或者配置错误所导致的。通过检查JTAG连接、芯片硬件、更新驱动以及确认调试工具设置,可以尝试解决这个问题。 #### 引用[.reference_title] - *1* [FL2440使用J-Link烧写Nand> Flash遇到CPU is not halted!](https://blog.csdn.net/weixin_34041003/article/details/90682576)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [keil仿真调试报错](https://blog.csdn.net/litchi_3/article/details/129925398)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [解决keil出现cpu is not halted && cannot read register XX while cpu is running的另类方法](https://blog.csdn.net/AgonyRR/article/details/98875004)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

拂去尘世尘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值