打印
[STM32F1]

workbench下载程序报错,0x2ba01477

[复制链接]
2155|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
liuyuanlnx|  楼主 | 2020-7-14 20:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
刚淘宝的stm32f103c8t6最小系统板,使用cubemx生成MDK代码,用stlink能烧录,能正常工作;
换到system workbench,同样的代码,同样的stlink,一直报错
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
MDK里看到的确实是  idcode: 0x2ba01477,从国外论坛看到有说0x2ba01477是国产芯片的标示,CKS32?有遇到相同问题的吗?怎么解决呢?

使用特权

评论回复
沙发
香水城| | 2020-7-15 21:51 | 只看该作者
到底什么问题?

是不是STLINK驱动要升级下?

另外,你用workbench还不如目前ST免费推广的stm32cubeIDE工具.

使用特权

评论回复
板凳
liuyuanlnx|  楼主 | 2020-7-16 22:16 | 只看该作者
你好,我今天换了个板子,F030C8T6的最小系统板,用CubeMX设置了外部时钟8MHz,TIM1,SPI1和UART1,把代码敲进去,然后build,成功。然后->Debug,选择AC6 STM32 C/C++ Application,自动生成cfg文件,也能成功。
再然后,问题来了,我又重复了一遍上面的操作,用CubeMX设置了外部时钟8MHz,TIM1,SPI1和UART1,把代码敲进去,然后build,成功。然后->Debug,选择AC6 STM32 C/C++ Application,自动生成cfg文件,报错了:
Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
none separate
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 8000 kHz
adapter_nsrst_delay: 100
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v31 API v2 VID 0x0483 PID 0x374B
Info : Target voltage: 3.261297
Warn : UNEXPECTED idcode: 0x0bb11477
Error: expected 1 of 1: 0x1ba01477
in procedure 'init'
in procedure 'ocd_bouncer'

使用特权

评论回复
地板
liuyuanlnx|  楼主 | 2020-7-16 22:17 | 只看该作者
成功的时候是这样子:
Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
none separate
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 8000 kHz
adapter_nsrst_delay: 100
Info : clock speed 8000 kHz
Info : STLINK v2.1 JTAG v31 API v2 M21 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.255010
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Stlink adapter speed set to 4000 kHz
Info : STM32F030C8Tx.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x08001a34 msp: 0x20002000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Stlink adapter speed set to 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x20006440
Info : flash size = 64kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20002000
wrote 7168 bytes from file Debug/lnxlastchance.elf in 0.416740s (16.797 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002000
verified 6980 bytes in 0.052969s (128.687 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

使用特权

评论回复
5
cornrn| | 2020-12-24 10:44 | 只看该作者
你应该买的是国产兼容的CKS32

使用特权

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

本版积分规则

1

主题

4

帖子

0

粉丝