STM32N6570-DK AI Model Flashing Error
- December 7, 2025
- 3 replies
- 1547 views
STM32N6570-DK Custom AI Model Flashing Error
Background / Official Requirements
According to the official documentation for flashing the AI model onto the DK, three key .HEX files are required:
-
ai_fsbl.hex
-
STM32N6570-DK_network_data.hex
-
STM32N6570-DK_GettingStarted_ObjectDetection.hex
Steps I Have Taken to Integrate My Custom Model
-
Model Conversion:
-
I successfully imported my custom model(st_yolo_x_nano_480_1.0_0.25_3_st_int8.tflite-STM32N6570-DK-code) into the ST Edge AI Developer Cloud.
-
After quantization, I obtained a folder containing the three necessary files for the network data: network.c, network_ecblobs.h, and network_atonbuf.xSPI2.raw.
-
Following the official guide, I used PowerShell to convert these three files into the single STM32N6570-DK_network_data.hex file.
-
This file was designated to be flashed at the correct memory address: 0x70380000
-
-
Application Code Modification:
-
I modified the application configuration file: Inc/app_config.h.
-
I used GPT to assist with the code modifications to ensure the project would successfully build in the IDE (to get a successful compilation).
-
The IDE build was successful, generating the required application files, including the $GettingStarted\_ObjectDetection.hex$ (I chose the .hex file for easier flashing without needing to manually select the address).
-
-
Flashing Sequence:
-
I used the programmer to flash the files in the following sequence:
-
ai_fsbl.hex (The official version from the Object Detection example).
-
STM32N6570-DK_network_data.hex (My self-generated data file).
-
STM32N6570-DK_GettingStarted_ObjectDetection.hex (My self-generated application file).
-
-
Result
After flashing, the camera and display both start up correctly, but the object detection output consistently displays the label "person" in a repeating loop, even when no person is present, suggesting the new model or its data is not being loaded/executed correctly.
My Self-Diagnosis / Hypotheses for Failure
-
Need for ai\_fsbl.hex Modification?
-
I haven't seen any posts on forums suggesting a need to modify the ai_fsbl.hex file. However, perhaps it needs to be adapted based on the architecture or requirements of my specific custom model.
-
-
Incorrect Application Code (Inc/app\_config.h:(
-
Even though the compilation was successful (0 errors), the content of the Inc/app_config.h (or other application code) might not be fundamentally correct for interfacing with my custom model, leading to this unexpected behavior.
-
