cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK AI Model Flashing Error

WUCHENGXUAN
Associate

 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:

  1. ai_fsbl.hex

  2. STM32N6570-DK_network_data.hex

  3. STM32N6570-DK_GettingStarted_ObjectDetection.hex

 Steps I Have Taken to Integrate My Custom Model

  1. 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

  2. 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).

  3. Flashing Sequence:

    • I used the programmer to flash the files in the following sequence:

      1. ai_fsbl.hex (The official version from the Object Detection example).

      2. STM32N6570-DK_network_data.hex (My self-generated data file).

      3. 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

  1. 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.

  2. 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.

 

(Virus scan in progress ...)
(Virus scan in progress ...)
(Virus scan in progress ...)
0 REPLIES 0