cancel
Showing results for 
Search instead for 
Did you mean: 

Can not debug STM32L552 Nucleo-144 board

tpeng.1
Associate III

I can not debug STM32L552 Nucleo-144 board with STM32CubeIDE 1.16.1

Here is output message from IDE:

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

    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.7.0-RC1          

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

ST-LINK SN : 0669FF505352716587121336

ST-LINK FW : V2J37M27

Board    : NUCLEO-L552ZE-Q

Voltage   : 3.26V

SWD freq  : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x472

Revision ID : Rev B

Device name : STM32L5xx

Flash size : 512 KBytes (default)

Device type : MCU

Device CPU : Cortex-M33

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a08360.srec

 File     : ST-LINK_GDB_server_a08360.srec

 Size     : 7640 Bytes

 Address    : 0x08000000 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 3]

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:00.231

Verifying ...

Error: Data mismatch found at address 0x08000000 (byte = 0xFF instead of 0x00)

Error: Download verification failed

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

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

6 REPLIES 6
Imen.D
ST Employee

Hello @tpeng.1​ ,

Can you please try to upgrade the STLink Firmware and then tell me if this resolve the issue ?

It may be the cause of this problem is on the configuration. I suggest you to share the option bytes settings?

Please kepp us about your update.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Hi Imen,
Thank you!
To upgrade the STLink does not resolve the issue.
The option bytes which read with STM32 CubeProgrammer:
Name Value Addr
RDP AA
BOR_LEV 0
nRST_STOP Checked
nRST_STDBY Checked
nRST_SHDW Checked
IWDG_SW Checked
IWDG_STOP Checked
IWDG_STDBY Checked
WWDG_SW Checked
SWAP_BANK Unchecked
DB256 Checked
DBANK Checked
SRAM2_PE Checked
SRAM2_RST Checked
nSWBOOT0 Checked
nBOOT0 Checked
PA15_PUPEN Checked
TZEN Checked
HDP1EN Checked
HDP1_PEND Value=0, Addr=0x8000000
NSBOOTADD0 Value=0x1000 Addr=0x8000000
NSBOOTADD1 Value=0x17f200 Addr=0xbf90000
SECBOOTADD0 Value=0x1800 Addr=0xc000000
BOOT_LOCK Unchecked
SECWM1_PSTRT Value=0x0 Addr=0x8000000
SECWM1_PEND Value=0x7f Addr=0x803f800
WRP1A_PSTRT Value=0x7f Addr=0x803f800
WRP1A_PEND Value=0x00 Addr=0x8000000
WRP1B_PSTRT Value=0x7f Addr=0x803f800
WPR1B_PEND Value=0x00 Addr=0x8000000
SECWM2_PSTRT Value=0x01 Addr=0x8040800
SECWM2_PEND Value=0x0 Addr=0x8040000
WRP2A_PSTRT Value=0x7f Addr=0x807f800
WRP2A_PEND Value=0x00 Addr=0x8040000
WRP2B_PSTRT Value=0x7f Addr=0x807f800
WRP2B_PEND Value=0x00 Addr=0x8040000
Br,
Tim
Imen.D
ST Employee

Hi @tpeng.1​ ,

Maybe this post can help you.

Please keep me updated about your progress on this issue.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Hi Imen,
I can program elf file to Nucleo-144 board with STM32CubeProgrammer, but I still can not debug it with IDE.
Br,
Tim

Hi @tpeng.1​ ,

Can you please try with the following option bytes:

  • TZEN=1 (TrustZone-enabled device)
  • DBANK=1 (Dual bank Flash configuration)
  • SECWM1_PSTRT=0x0 SECWM1_PEND=0x7F
  • SECWM2_PSTRT=0x1 SECWM2_PEND=0x0

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
tpeng.1
Associate III

Hi Imen,

Thank your help.

The option byte values given from you is the same as the my board settings.

I uncheck the “Verify flash down�? in IDE debug tab.  File download complete. When viewing disassembly,

fffffffe:  Failed to execute MI command:

         -data-disassemble -s 4294967294 -e 4294967434 -- 3

         Error message from debugger back end:

         Cannot access memory at address 0xfffffffe

ffffffff:  Failed to execute MI command:

         -data-disassemble -s 4294967295 -e 4294967411 -- 3

         Error message from debugger back end:

         Cannot access memory at address 0xfffffffe

….

Br,

Tim