我用CLion进行STM32的开发时,使用的Stlink,相关配置也是常规的设置,编译正常,但是下载报错,报错如下
[C] 纯文本查看 复制代码 [0m[0mOpen On-Chip Debugger 0.12.0 (2023-07-12) [[url]https://github.com/sysprogs/openocd[/url]]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
[url]http://openocd.org/doc/doxygen/bugs.html[/url]
Info : The selected transport took over low-level target control. The results mi
ght differ compared to plain JTAG/SWD
none separate
Info : clock speed 10000 kHz
Info : STLINK V2J42S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.226047
Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : gdb port disabled
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Error: timed out while waiting for target halted
embedded:startup.tcl:1467: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1504
at file "embedded:startup.tcl", line 1467
没办法我切换到STM32CubeProgrammer,常规的选择不行,报错如下:
[C] 纯文本查看 复制代码 16:39:33 : UR connection mode is defined with the HWrst reset mode
16:39:35 : ST-LINK SN : 57FF6A064989575224521687
16:39:35 : ST-LINK FW : V2J42S7
16:39:35 : Board : --
16:39:35 : Voltage : 3.24V
16:39:35 : Error: ST-LINK error (DEV_TARGET_RESET_ERR)
必须要将mode设置为Hot Plug才可以连接到Target
[C] 纯文本查看 复制代码 16:40:35 : UR connection mode is defined with the HWrst reset mode
16:40:35 : ST-LINK SN : 57FF6A064989575224521687
16:40:35 : ST-LINK FW : V2J42S7
16:40:35 : Board : --
16:40:35 : Voltage : 3.24V
16:40:35 : SWD freq : 4000 KHz
16:40:35 : Connect mode: Hot Plug
16:40:35 : Reset mode : Hardware reset
16:40:35 : Device ID : 0x413
16:40:35 : Revision ID : Rev 2.0
16:40:35 : Debug in Low Power mode is not supported for this device.
16:40:35 : UPLOADING OPTION BYTES DATA ...
16:40:35 : Bank : 0x00
16:40:35 : Address : 0x40023c14
16:40:35 : Size : 4 Bytes
16:40:35 : UPLOADING ...
16:40:35 : Size : 1024 Bytes
16:40:35 : Address : 0x8000000
16:40:35 : Read progress:
16:40:35 : Data read successfully
16:40:35 : Time elapsed during the read operation is: 00:00:00.007
|