首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么在尝试使用openocd连接stlink-v2时出现通信故障

为什么在尝试使用openocd连接stlink-v2时出现通信故障
EN

Stack Overflow用户
提问于 2021-03-09 00:31:09
回答 1查看 714关注 0票数 1

我正在尝试使用stlink-v2连接到一个'stm32‘'bluepill’来编写一些代码

每当我运行openocd时,它都无法连接我的openocd.cfg文件,如下所示

代码语言:javascript
运行
复制
source [find interface/stlink-v2.cfg]
source [find target/stm32f3x.cfg]

当我运行openocd时,这是我收到的响应:

代码语言:javascript
运行
复制
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v35 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.166623
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 300ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 700ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 1500ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 3100ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 6300ms
^C

我以前写了一些代码到bluepill上的stm32f103,当我连接到我的PC时,代码就会运行(它会导致pc13上的led闪烁)

自从上次运行良好以来,我没有修改过openocd.cfg文件

EN

回答 1

Stack Overflow用户

发布于 2021-06-21 09:34:17

在OpenOCD尝试连接时,按住重置按钮。

我在我的STM32F3DISCOVERY主板上得到了完全相同的错误。

这样做可以让我再次建立联系。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66533547

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档