cancel
Showing results for 
Search instead for 
Did you mean: 

Cant debug my own board with a STM32F303VB MCU - how to resolve this issue?

MQuit
Associate II

Hi,

I just powered up my own board and i just wanted to start debuging.

The first thing i tried was to connect with the STM32 ST-Link Utility and an ST-Link V2.

This works fine. I can connect via SWD and can read the Chip-ID and see the Flash.

In terms of the hardware everything seemed to be fine for me.

0693W000006El2VQAS.jpgSo i continued with setting up the newest Cube IDE which i just downloaded. (Version: 1.5.0)

I set up an example project, with my processor and SWD enabled and tried to start debugging. But this is where i encountered the problem. When i was starting the debugging session, it took forever to connect, showing the following debug log:

 
STMicroelectronics ST-LINK GDB server. Version 5.7.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Waiting for debugger connection...
Debugger connected
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.6.0-RC3                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 52FF6D067189554829302567
ST-LINK FW  : V2J37S7
Board       : --
Voltage     : 2.48V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x422
Revision ID : Rev Y
Device name : STM32F302xB-xC/STM32F303xB-xC/F358xx
Flash size  : 128 KBytes
Device type : MCU
Device CPU  : Cortex-M4

this took some minutes.

and the following progress status appeared for some time:

0693W000006El2zQAC.jpgAfter some time, the debugging session showed the following log:

Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a05992.srec
  File          : ST-LINK_GDB_server_a05992.srec
  Size          : 6340 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 3]
Error: failed to erase memory
 
 
Error: failed to erase memory
Encountered Error when opening C:\ST\STM32CubeIDE_1.5.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.5.0.202011040924\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
 

How can i resolve this issue?

I am open for any suggestions.

Best Regards

Markus

1 ACCEPTED SOLUTION

Accepted Solutions
MQuit
Associate II

Resolved! - the problem was caused by an instable power supply!

View solution in original post

3 REPLIES 3
MQuit
Associate II

Just a small addition to my problem - i am using Windows 10 - just for you to know if this can be related to such a Problem

MQuit
Associate II

0693W000006El3xQAC.jpgJust found out, that a full chip erase in stm32 st-link utility wont complete and does not work.

MQuit
Associate II

Resolved! - the problem was caused by an instable power supply!