打印
[应用相关]

SensorTile下载出现Can not attach to CPU. Trying connect under reset.

[复制链接]
501|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
cr315|  楼主 | 2020-12-14 10:05 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
下午在用SensorTile调试Beacon程序使用STM32CubeExpansion_BLE1_V2.8.0\Projects\Multi\Applications\Beacon例程

很顺利,已经能通过BLE发送广播数据
ANDROID也可以正常接收

于是小睡一觉
醒来后简单修改了几段程序
再用IAR下载时就提示错误
试了很多次,重启了电脑也不行
又用MDK的设置看一下能不能找到芯片
结果选择SWD的时候就卡一会,然后MDK就会退出
几次都是这样

这些操作曾经都是好用的
于是又使用SEGGER文件夹里的J-Flash Lite试试
原来也是好用的
现在J-Flash Lite提示
Device "STM32L476RG" selected.
Found SWD-DP with ID 0x2BA01477
STM32 (connect): Can not attach to CPU. Trying connect under reset.
Found SWD-DP with ID 0x2BA01477
STM32: Connecting to CPU via connect under reset failed.


能找到单片机,可就是下载不了
最后看到“under reset”这段
在点下载前先按住开发板上的RESET键
点击下载
然后松开RESET键看到错误信息不一样了


Downloading D:\10.stsensor\2.code\STSW-STLKT01\Utilities\BootLoader\STM32L476RG\BootLoaderL4.bin to STM32L476RG via SWD-Interface@1000kHz
Programming Thread started.
Device "STM32L476RG" selected.
Found SWD-DP with ID 0x2BA01477
STM32 (connect): Can not attach to CPU. Trying connect under reset.
Found SWD-DP with ID 0x2BA01477
Found SWD-DP with ID 0x2BA01477
AP-IDR: 0x24770011, Type: AHB-AP
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
STM32 (connect): Timeout while waiting for CPU to halt after reset. Manually halting CPU.
Debugger initialized successfully.
J-Link: Flash download: Flash programming performed for 1 range (6144 bytes)
J-Link: Flash download: Total time needed: 0.345s (Prepare: 0.120s, Compare: 0.007s, Erase: 0.068s, Program: 0.136s, Verify: 0.001s, Restore: 0.010s)
Programming Thread exited
Programming failed.


再点下载提示成功


Downloading D:\10.stsensor\2.code\STSW-STLKT01\Utilities\BootLoader\STM32L476RG\BootLoaderL4.bin to STM32L476RG via SWD-Interface@1000kHz
Programming Thread started.
Device "STM32L476RG" selected.
Found SWD-DP with ID 0x2BA01477
Found SWD-DP with ID 0x2BA01477
AP-IDR: 0x24770011, Type: AHB-AP
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
Debugger initialized successfully.
J-Link: Flash download: Flash download skipped. Flash contents already match
Programming Thread exited
Programming done


再用IAR和MDK就都可以正常下载了
又下载了Beacon例程
然后又出现这个问题

顿时天空漂过5个字儿“低功耗"



此帖出自MEMS传感器论坛

QQ图片20170214164307.png (80.93 KB, 下载次数: 0)


[url=] [/url]

QQ图片20170214164255.png (83.61 KB, 下载次数: 0)


[url=] [/url]

QQ图片20170214170205.png (616.85 KB, 下载次数: 1)


[url=] [/url]


使用特权

评论回复
沙发
稳稳の幸福| | 2020-12-14 22:15 | 只看该作者
这技能可以,这个屏幕还给力

使用特权

评论回复
板凳
laocuo1142| | 2020-12-15 17:05 | 只看该作者
是不是程序把swd接口的引脚给禁掉了?

使用特权

评论回复
地板
laocuo1142| | 2020-12-15 17:05 | 只看该作者

复位,重新上电后下载

使用特权

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

本版积分规则

1320

主题

3787

帖子

0

粉丝