2025-08-26 2:34 AM
I was trying to deploy YOLO models with NUCLEO-N657X0-Q board, following instructions shown in the README file in the repository "STM32N6-GettingStarted-ObjectDetection"README.md . While using prebuild binaries, it told me to use STM32CubeProgrammer to program several .hex files. And here's the problem:
After connected, I choose the "ai_fsbl.hex" file, and clicked "start programming".Then the connection is disabled, with 2 messages saying "connections to device 0x486 is lost" and "failed to download files".
The log is shown below:
16:51:32 : Opening and parsing file: ai_fsbl.hex
16:51:32 : Memory Programming ...
16:51:32 : File : ai_fsbl.hex
16:51:32 : Size : 59.59 KB
16:51:32 : Address : 0x70000000
16:51:32 : Erasing memory corresponding to segment 0:
16:51:32 : Download in Progress:
16:51:32 : Error: failed to download Sector[0]
16:51:32 : Error: failed to download the File
16:51:32 : Warning: Connection to device 0x486 is lost
16:51:32 : Disconnected from device.
After the disconnection, I can't connect the board to the CubeProgrammer again until I unplug the wire connecting the board with my laptop and then plug it back. Same error messages show every time when I try to connect the board again.
Here are more info of my enviroment/settings:
Enviroment:
Windows11
CubeProgrammer v2.20.0
CubeIDE & CubeMX also installed (newest ver)
STLINK of the board is updated to V3J16M8
The cable is a USB C-to-A cable. I've seen some posts saying that the C-to-C cable may solve the problem, but I don't have one at now. I've bought one C-to-C cable through Alibaba and it should be delieverd to me tomorrow, then I'll try if the cable can solve the issue.
Settings:
1. The ST-LINK configuration is shown below:
I've tried changing some of the configuration like "Frequency", "Mode", "Reset mode", but it doesn't work, the same messages still show.
2. The programming configurations are shown below:
I've also tried several different settings, but it still didn't work.
If any other informations needed, please inform me and I'll post it in the comments. And I'll be very appreciated if you could tell me what to do to solve this. Thanks.
Solved! Go to Solution.
2025-08-26 7:48 PM
I found the point. I should select the External Loader.
Here's the solution:
Click the "EL" button left-bottom, and search the "STM32N657", select the one with NUCLEO(according to board maybe), and repower and reconnect it. Then the file should be downloaded successfully (at least mine is downloaded now).
Anyway a big thanks to you Julian !
2025-08-26 7:48 AM - edited 2025-08-26 7:50 AM
Hello @Wen0127,
Did you put the board in dev mod:
In this image, the board is in boot from Flash.
To load the .hex files, first put both pin up, unplug and re plug the board, open CubeProgrammer and try to download the firmwares.
Then put the pins back to Flash boot, reset the board again to launch the application.
You can also try to select the External loader in CubeProgrammer:
Have a good day,
Julian
2025-08-26 6:57 PM
Thank you for replying! But I've tried different boot modes and it didn't work. When the pins are both down, my laptop can't even recognize my board, saying"no STM32 target found"or things like that(I don't remember the exactly text :( ). When the boot1 is up, the situation is like what I said in the post.
By the way I've also tried using a C-to-C cable, but the problem is still not solved. The cable supports PD and thunderbolt so I think it's not a cable-caused issue...
2025-08-26 7:48 PM
I found the point. I should select the External Loader.
Here's the solution:
Click the "EL" button left-bottom, and search the "STM32N657", select the one with NUCLEO(according to board maybe), and repower and reconnect it. Then the file should be downloaded successfully (at least mine is downloaded now).
Anyway a big thanks to you Julian !