2024-12-24 12:16 PM
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.
Solved! Go to Solution.
2024-12-28 1:44 AM
Hello @tjaekel
Yes STM32N6 only works with:
STM32CubeProgrammer V2.18.0
STM32CubeMX V6.13.0
STM32CubeIDE V1.17.0
The corresponding firmware package is STM32Cube_FW_N6_V1.0.0
For firmware development, I can also suggest to refer to UM3249:
Let me answer to your questions:
The image has to be signed, e.g. via:
STM32_SigningTool_CLI.exe -bin Appli_FW.bin -nk -of 0x80000000 -t fsbl -o Appli_FW-trusted.bin -hv 2.3 -dump Appli_FW-trusted.bin
What is this of 0x80000000? The external flash starts at 0x70000000. Does it mean, the code image at 0x80000000 and it is concatinated with the bootloader header at 0x70000000?
Let check our STM32 Signing Tool Wiki page:
STM32 SigningTool - stm32mcu
0x80000000 is not an address, it's preceded by -of meaning option flag for the binary image.
It requires to build the MCU FW as Appli:
Have a sub-project *_Appli and build this one.
But which Linker Script to use?
The STM32N657X0HXQ_LRUN.ld seems to build in the same way to load (via debugger) and execute from internal SRAM (loading and debugging with ST-LINK, with the BOOT1 changed, works as before, with the FSBL file generated, intended to be loaded and for debug when loaded and executed on internal SRAM)
In complement to my explanations here: LRUN application are linked and executed as below:
I tried to flash this file (after signing) - but power on does not executed my code:
a) We have to use STM32CubeProgrammer
b) We have to activate the external bootloader (for this board!)
c) OK: I can erase entire chip (necessary to do manually?!)
d) I can flash the signed image
There are 3 possible reasons why the code does not execute after flashing to external memory:
1. The STM32N6 device is not in Flash_BOOT properly (BOOT0=0 and BOOT1=0)
2. The FSBL binaries is not signed, or the applied header is not matching with the AXISRAM2 address 0x34180000 + header 0x400
3. The FSBL binary is not programmed into the external Flash memory, this step must be always do when the STM32N6 device is in DEV_BOOT.
Could you check, share the log when you perform STM32_SigningTool.exe?
Same when you programmed the external NOR Flash, have you used the external loader compatible with your memory?
After reading external memory at 0x70000000, what do you read?
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.
2025-01-06 12:34 AM
@cersoy wrote:
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 ...
1Unfortunately 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.
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.
2025-01-06 12:55 AM
@cersoy wrote:
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.
Please note that the UM3417 is currently available.
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.
2025-04-25 5:11 AM
I am currently working with the STM32N657X0H3Q device on the NUCLEO-N657X0-Q board.
Following the official Template_FSBL_LRUN example, I successfully generated and signed both FSBL and Appli binaries using STM32CubeIDE and STM32_SigningTool_CLI v2.19.0.
In DV Mode (BOOT1 = High), I programmed:
After programming, I set the BOOT1 jumper back to low (BOOT1 = 0) to boot from external XSPI Flash.
However, after reset, the board appears unresponsive — no LED blinking or visible activity from the Appli.
As suggested in the documentation, I have enabled the NO_OTP_FUSE preprocessor macro in the FSBL project.
You will find the signed binaries and project files attached for your reference.
I would appreciate your help in identifying why the application does not execute after the FSBL handover.
Best regards,
Han
2025-04-25 7:35 AM
Hello @HANITALY
I just checked to program the secure signed binaries attached in your Template_FSBL_LRUN.zip
I used STM32CubeProgrammer 2.19.0 and program at the address indicated previously here.
On my NUCLEO-N657X0-Q, I confirm the Green Led blinking. No issue on my side.
Could you send a picture of your board and showing all black jumper settings?
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.
2025-04-25 7:43 AM
Before trying again on your side, could you check the sequence below:
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.
2025-04-25 1:48 PM
Thank you very much for your response!
Yes, I tried again under your instructions, but it ended up with the same result.
I would like to share with you what I did step by step.
Since you have confirmed it worked on board, I assume I might have done something wrong that I did not notice.
Thank you for your time and commitment!
Best Regards
Han
2025-04-25 11:30 PM
Hi @HANITALY
All seems to be correct in the last pictures you shared.
Could you confirm the backside stickers of the board?
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.
2025-04-26 1:01 AM
2025-04-26 9:22 AM - edited 2025-04-26 9:23 AM
Thank you for the picture, I used the same CR4 versions to program your signed binaries.
Your hardware seems to be correct for me.
Let's check OTP11 and OTP124 configuration of your Nucleo board.
OTP124: HCONF1 here the Bit 15 HSLV_VDDIO3 and Bit 16 HSLV_VDDIO2 are set
In the last solution you can follow this Knowledge Base article to flash OTP124 0x0001 8000:
https://community.st.com/t5/stm32-mcus/how-to-program-the-otp-fuse-bits-in-the-stm32n6/ta-p/782353
In attachment, you can try to use the bat script to sign and flash your binaries using STM32_Programmer_CLI.exe.
You should update the path of the compiled binaries and their names.
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.