cancel
Showing results for 
Search instead for 
Did you mean: 

hi i am using a STM32H745BIT6 chip it is connecting to the st-link but when i try to debug it its not letting me do it it says the following error:

fMoha.1
Associate II

STMicroelectronics ST-LINK GDB server. Version 5.8.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

       Persistent Mode           : Disabled

       LogFile Name              : C:\WORK\NEW_PROJECTS_DEV_BOARD\prototype_1\prototype\CM4\Debug\st-link_gdbserver_log.txt

       Logging Level             : 31

       Listen Port Number        : 61234

       Status Refresh Delay      : 15s

       Verbose Mode              : Enabled

       SWD Debug                 : Enabled

Target connection mode: Attach

Reading ROM table for AP 3 @0xe00fffd0

Hardware watchpoint supported by the target

COM frequency = 4000 kHz

ST-LINK Firmware version : V2J37S7

Device ID: 0x450

PC: 0x1

ST-LINK device status: LOCKUP

Enter STM32_AppReset() function

NVIC_DFSR_REG = 0x00000009

NVIC_CFGFSR_REG = 0x00001100

ST-LINK detects target voltage = 2.94 V

Device in lock up state, possibly "read and debug" protected. Use monitor commands to remove the protection

ST-LINK device initialization OK

Waiting for debugger connection...

Waiting for connection on port 61234...

Accepted connection on port 61234...

Debugger connected

ST-LINK device status: HALT_MODE

Enter STM32_AppReset() function

NVIC_DFSR_REG = 0x00000008

NVIC_CFGFSR_REG = 0x00000000

 ------ Switching to STM32CubeProgrammer -----

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.7.0-RC1                 

     -------------------------------------------------------------------

Log output file:  C:\Users\FMOHAM~1\AppData\Local\Temp\STM32CubeProgrammer_a20644.log

ST-Link Server is running on port : 7184

ST-LINK SN : 30FF6F065647373734141043

ST-LINK FW : V2J37S7

Board      : --

Voltage    : 2.93V

SWD freq   : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x450

Revision ID : Rev V

Device name : STM32H7xx

Flash size : 2 MBytes (default)

Device type : MCU

Device CPU : Cortex-M7/M4

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a20644.srec

 File         : ST-LINK_GDB_server_a20644.srec

 Size         : 39552 Bytes

 Address      : 0x08100000

Erasing memory corresponding to segment 0:

Erasing internal memory sector 8

Error: failed to erase memory

Error: failed to erase memory

Encountered Error when opening C:\ST\STM32CubeIDE_1.2.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.6.0.202101291314\tools\bin\STM32_Programmer_CLI.exe

 ------ Switching context -----

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

i did try to erase all the memory but it says its read protected and i checked in the options bites too there is no protection

10 REPLIES 10
fMoha.1
Associate II

its says some flash pages are protected when i try to erase it

MM..1
Chief II

Check your chip is real BI 2M flash or dual bank config...

Your code addr seems to load code with 1M offset

fMoha.1
Associate II

it is a dual core M4 and M7

A custom designed board?

Sure that VCAP pins have suitable capacitance, and are at around 1.25V?

Watch also that code uses LDO or SMPS configuration based on design, as these aren't interchangeable and can lead to serious connectivity issues.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fMoha.1
Associate II

hi

it is a custom board, the SMPS are power pins.

so you need to connect them high or low depending on design not to be left floated

fMoha.1
Associate II

hi

every one

i check every thing, but its not the power or the connection. i solved it by connecting the ST-Link VCC to the board VCC. when i connect the external power then i am having the problem

fMoha.1
Associate II

i am having a different problem, i am using dual core but when i program it and start the debugger the it says "Target is not responding, retrying...". i thing it has to do with the TRACK and DEBUG in .ioc file. can you help me with that?

i never used dual core so i am not familiar with it.

>>TRACK and DEBUG

??

Trace?

Sorry I'm using Keil

Perhaps look for some videos or tutorials for CubeIDE

https://www.youtube.com/watch?v=k3mXhPZSasw

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fMoha.1
Associate II

yes sorry ,

trace

0693W00000KbCDkQAN.png