cancel
Showing results for 
Search instead for 
Did you mean: 

stm32c011f6p6

choi1
Associate

Hello sir,  

I used stm32cubeide  with stlink v2.   

I tried to download the *.elf file to stm32c011f6p6 chip however, I have the error 

====

Open On-Chip Debugger 0.12.0-00017-gb153daa14 (2023-02-03-14:58) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J42S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.274308
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0bc11477
Info : [STM32C011F6Px.cpu] Cortex-M0+ r0p1 processor detected
Info : [STM32C011F6Px.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for STM32C011F6Px.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : [STM32C011F6Px.cpu] external reset detected
Info : accepting 'gdb' connection on tcp/3333
Error: Fail reading CTRL/STAT register. Force reconnect
Error executing event gdb-attach on target STM32C011F6Px.cpu:
C:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.0.600.202303311036/resources/openocd/st_scripts/gdb_helper.tcl:18: Error: TARGET: STM32C011F6Px.cpu - Not halted
in procedure 'gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.0.600.202303311036/resources/openocd/st_scripts/target/stm32c0x.cfg", line 128
in procedure 'first_gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.0.600.202303311036/resources/openocd/st_scripts/gdb_helper.tcl", line 18
Info : stlink_dap_op_connect(reconnect)
Info : stlink_dap_op_connect(reconnect)
Info : SWD DPIDR 0x0bc11477
Error: Failed to read memory at 0xf0000fec
Info : stlink_dap_op_connect(reconnect)
Info : SWD DPIDR 0x0bc11477
Error: Failed to read memory at 0xf0000fec
Error: can't get the device id
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Polling target STM32C011F6Px.cpu failed, trying to reexamine
Info : stlink_dap_op_connect(reconnect)
Examination failed, GDB will be halted. Polling again in 100ms
shutdown command invoked

==============

I need your help.  How to solve this problem?

Thanks 

2 REPLIES 2
choi1
Associate

This is the schematic. 

choi1_0-1687537892813.png

 

Peter BENSCH
ST Employee

Can you please upload a photo of the ST-LINK/V2?

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.