cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-N657X0-Q: failed to start GDB server

cersoy
Associate II

I am trying to start a debugger session to my new NUCLEO-N657X0-Q and getting the following error:

STMicroelectronics ST-LINK GDB server. Version 7.9.0
Copyright (c) 2024, 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

Target unknown error 32

Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.

 I am using the latest version of STM32CubeIDE (1.17.0)

The STM32CubeProgrammer (v2.18.0) is also unable to program any binaries on the board.  After changing the Reset Mode to "Hardware reset" I am able to connect to the board, but immediately get the error message: 

15:09:28:207 : UR connection mode is defined with the HWrst reset mode
15:09:28:364 : ST-LINK SN : 002F00453433511830343835
15:09:28:365 : ST-LINK FW : V3J15M7
15:09:28:365 : Board : NUCLEO-N657X0-Q
15:09:28:365 : Voltage : 3.27V
15:09:28:365 : SWD freq : 8000 KHz
15:09:28:365 : Connect mode: Normal
15:09:28:365 : Reset mode : Hardware reset
15:09:28:365 : Device ID : 0x486
15:09:28:365 : Revision ID : Rev A
15:09:28:365 : reset ap 1
15:09:28:365 : Reading data...
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : Database: Config 0 is active.
15:09:28:461 : UPLOADING ...
15:09:28:461 : Size : 1024 Bytes
15:09:28:461 : Address : 0x8000000
15:09:28:462 : Read progress:
15:09:28:462 : Reading data...
15:09:28:462 : r ap 1 @0x08000000 0x00000400 bytes Data 0x00000018
15:09:28:541 : r ap 1 @0x08000000 0x00000400 bytes Data 0x00000011
15:09:28:541 : Error: Data read failed

 Unfortunately link to user manual UM3417, which is https://www.st.com/resource/en/user_manual/dm01122391.pdf (per STM32 Nucleo-144 boards data brief) is currently unavailable.  

I don't understand what I am doing wrong from the error messages, and can't access the user manual.  I would appreciate if someone can shed light on the issue I am seeing.

24 REPLIES 24

@RomainR. 

 

Thank you for the response.

Yes,  after programming OTP124 0x00018000, setting BOOT1 back to 0 and pressing reset, the LED blinked.

 

However, when I powered off the board and re-powered it again, although the LED is blinking, I am not able to connect the board on the CUBEProgrammer.

 

HANITALY_0-1745739168715.png

Does that mean the overall programming is not fully successful?

 

Best Regards

Han

 

 

 

Hello @HANITALY 

It's good news that the programming of binaries and booting from external Flash now works on your board.

I don't know why you want to reconnect with STM32CubeProgrammer in Flash boot? The opening of the debug port is only possible in Dev_Boot mode, this is due to the lifecycle of the STM32N6.
You can refer to this article here:
https://community.st.com/t5/stm32-mcus/stm32n6-boot-rom-explained/ta-p/763648

For more detail, there is also the UM3234 which explains how BootROM works on STM32N6:
https://www.st.com/resource/en/user_manual/um3234-how-to-proceed-with-boot-rom-on-stm32n6-mcus-stmicroelectronics.pdf

Best regards,

Romain

 

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.

@RomainR. 

 

I think I misunderstood it before.

Thank you very much for all the help! 

 

Have a good one!

 

Best Regards,

Han

Hello, for the nucleo-N657X0-Q i see in the schematic that VVDIO2 is fed by VDDIO (3.3V). Won't this OTP setting (OTP124 0x00018000) damage the MCU? 

I'm having the exact same problem (with the latest board version), but after reading the warning "Be aware that setting HSLV_VDDIOx and VDDIOxVRSEL bits while VDDIOx is in the 3.3 V range damages the device." i am reluctant to burn the OTP fuses.

Can you please verify that this OTP setting is OK for the nucleo?

 

Thanks

Hello @Unfgr 

Yes it's correct, on Nucleo-N657X0-Q VDDIO2, VDDIO4 & VDDIO5 are supplied by 3.3V.

VDDIO3 is 1.8V because there is only octospi NOR Flash MX25UM51245 (U31) operates at 1.8V, and there is no external hexa PSRAM comparing to STM32N657-DK on VDDIO2. 

This mean, on Nucleo only OTP 124 HSLV_VDDIO3 bit 15 and corresponding VDDIO2VRSEL bit must be enabled (OTP124 = 0x00008000)

Best regards,

Romain

 

 

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.