Get ready for the STM32 Summit 2026 | Online, November 3
Ask questions and find answers on how to deploy, debug, and optimize AI models on ST microcontrollers, microprocessors, and smart sensors.
Most recent activity
Dear all,I have the STM32N6570-DK ,MB1860B version . I'm trying to follow the procedure to flash the .bin files. The programming seems ok, but when I reboot the kit, there's no application... the screen is inactive. However, I can successfully flash the demos stm32n6570-dk-ai-demo-v1-0-0 and N6_OoB_v1.3_single_hex.the link: x-cube-n6-ai-h264-usb-uvc Applicationhttps://github.com/STMicroelectronics/x-cube-n6-ai-h264-usb-uvc/blob/main/Doc/Program-Hex-Files-STM32CubeProgrammer.md Can you help me ? Cheers Emmanuel
Hi @Julian E. While following along the tutorial: How to build an AI application from scratch on the... - STMicroelectronics Community after selecting the x-cube-ai package a described, I see that the default is enabled for fsbl and I cannot change that to application in the UI. Tried deselecting fsbl first, but it doesn't work. Then I downloaded your ioc and there it is set to applciation - but this cannot be changed to anything else (for example to fsbl) - basically the checkboxes cannot be changed. Have you seen this? What am I doing wrong? Also, I get this warning: I have installed all the firmwares by first downloading as zip and then installing from local in CubeMX I have downloaded v1.1.1, v1.1.0 and v1.2.0 as well as the patch file from ST website and still get the same warning Update 17/08/25: With the downloaded ioc file, I see some clock config errors as: Is this okay? Also - please explain what should be the input to validation dataset for
Hello, I am working with the LL_ATON library on STM32N6 and testing the LL_ARITHACC unit using the AFFINE operation, defined as: Output=A⋅X+B⋅Y+C.I ran several tests with a simple network model whose only purpose is X + Y.My expectation is:Case 1: A = 0, B = 0, C = 1→ Output is correctly constant 1 as expected.Case 2: A = 1, B = 0, C = 0→ Expected output = X, but the results are completely wrong and look like random values.Case 3: A = 0, B = 1, C = 0→ Expected output = Y, but again the results are incorrect and look randomSo, while the C_scalar works correctly, the usage of A_scalar and B_scalar does not produce the expected behavior.Questions:Is there any special configuration needed in the switch/stream setup for X and Y inputs when using AFFINE?The following screenshots are taken from the network.c file generated by the STEdgeAI compiler after compiling my simple X + Y tflite model. They show the configuration of the LL_ARITHACC unit for the AFFINE operation.Thanks.&n
In the STM32 model zoo github repo, only the STM32U5 is listed as a recommended platform for the Audio Event Detection models.I'm trying to work out why the STM32N6 (and other devices) are not listed.Is it because it has not yet been tested, or is there truly some reason the platform is not suitable?Thanks,Louis
I'm trying to deploy my own AI models on the STM32N6570-DK board. To speed up this process, I directly use the example project "STM32N6-GettingStarted-ImageClassification-main" from the official website. https://www.st.com/en/development-tools/stm32n6-ai.html My own network is generated with ST Edge AI developer Cloud. Code replacement and adjustments have been completed, and the project can be successfully built.When programming the example hex files, everything works fine. However, after programming my own hex files in STM32Programmer, the board either stays at last project or just doesn't react(the lcd goes black). I followed the procedures of programming hex files:1. program ai_fsbl.hex, which is already in the folder2. program network_data.hex generated following this posthttps://community.st.com/t5/edge-ai/how-to-generate-a-hex-file-for-a-neural-network-model/td-p/814889 3. program project_name.hex, which is the output of building the proje
Hello everyone,I’m currently deploying multiple models on STM32 using X-CUBE-AI (for example: first using an MLP for a coarse classification “Gas / Not Gas”, then a second model for detailed gas class identification). I’d like to ask about two main topics: Question 1: If multiple models have the same input shape/size, can they “share the same input buffer”?Both models have identical input dimensions, data type (float32), and layout (e.g. 1x60 vector).I’d like to point both models’ ai_buffer.data to the same float in[60], then call ai_*_run sequentially (never in parallel).Is this approach safe/supported in X-CUBE-AI? Could any model overwrite the input buffer during inference (theoretically it shouldn’t, but I’d like to confirm with ST/others) Question 2: What is the best way to use and manage APIs with multiple models?When two (or more) models coexist on the same MCU:A. Keep completely separate weights[] and activations[] (independent), each with its own create/init/run/dest
Hi everyone,I’m currently working on a project involving predictive maintenance and anomaly detection using the STWINBX1 (STEVAL-STWINBX1) board. I’ve successfully configured the board and flashed it using STM32CubeIDE, ensuring everything is set up as expected. I’ve also downloaded the NanoEdge Datalogger and flashed it using STM32 ST-Link Utility, but despite everything being correctly configured, NanoEdge AI Studio is not receiving any data from the board.Here’s what I’ve checked so far:The board is properly connected to my PC.I’ve verified the COM port number, and I'm sure it's correct.The NanoEdge Datalogger has been flashed successfully.The board’s sensors are properly connected and powered.Despite these steps, the data is not being received in NanoEdge AI Studio. I’ve also ensured that no other processes are using the COM port, and I’ve checked that all configurations are aligned with the expected setup.Can anyone suggest what could be causing this issue or guide me on where I m
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
Hello ,Could you let me know the max size of model can fit in STM32N6570-DKRegards,Sandeep
Hi everyone,I'm working with an STM32N6 board and trying to deploy a custom YOLOv8n model in ONNX format using CubeMX and STM32 Edge AI. I’ve run into a few issues and was hoping someone could help clarify the process.Here’s what I’ve done so far:I successfully imported my yolov8n.onnx model into CubeMX + Edge AI.When I try to test the model using a .PNG image, I get an error saying PNG format is not supported. When I generate the C code using the model, I see a line in network.c where -inf is not defined, causing compilation errors.My Questions:How can I test my model using a PNG image, either on the STM32N6 device or on a desktop simulation?Do I need to convert the PNG to raw input data manually?What’s the correct way to prepare a PNG image as an input buffer for use with STM32 inference code?How do I resolve the -inf not defined issue in the generated network.c?Any help, code snippets, or documentation pointers would be greatly appreciated!Thanks in advance!
I am trying to make a minimal working example of a neural network running on the NUCLEO-N657X0-Q. To achieve this I followed this guide for the STM32N6570-DK on my own NUCLEO-N657X0-Q board. (https://community.st.com/t5/stm32-mcus/how-to-build-an-ai-application-from-scratch-on-the-stm32n6570-dk/ta-p/825591#!/825591)However, CubeMX did not initialize the required code lines noted in the guide under "Important note 2".Guide's screenshot:My screenshot:I did small address adaptions for the NUCLEO-N657X0-QLEDs: PG0, PG8EXT_SMPS_MODE: PB12I will attach the project below. Did I make a mistake or is CubeMX not able to configure the NUCLEO-N657X0-Q in the same way it supports the STM32N6570-DK yet? I also tried adding the lines from the screenshot of the guide myself, but it didn’t change the results and I assume there is more missing than is visible in the guide's screenshot. I also assume the missing RIF and RIMC code lines are the main reason why the application didn’t work.I still wro
I am trying to run tflm with stm32f769 eval. I build the tflm as a static library and included it in my project. My app is crashing whille calling allocatetensors() function. Anyone having any luck with it? Also I couldn' find any official demo for running tflm with stm32.I am struggling to run my basic model on stm32f769 board. It is failing in allocate tensors step.My program crashes on the 9th iteration."AllocateTensors()->StartModelAllocation()->AllocateTfLiteEvalTensors()->InitializeTfLiteEvalTensorFromFlatbuffer()."Any help here will be appreciated.I couldn’t find any official documentation or tutorial which I could follow.
hiI have validate on the STM32N6 board by onnx model in STM32MX,but i have two different output ,like this: m_outputs_1: (10, 3)/float64, min/max=[-282.578064, 481.370483], mean/std=[-2.619613, 298.301398], output m_outputs_2: (10, 1)/float64, min/max=[0.000000, 0.000000], mean/std=[0.000000, 0.000000], node_139 c_outputs_1: (10, 1, 1, 3)/float32, min/max=[-4.547175, 5.813805], mean/std=[0.008044, 4.321293], output c_outputs_2: (10, 1, 1, 1)/float32, min/max=[0.000800, 0.000800], mean/std=[0.000800, 0.000000], node_139the m_outputs_1 is error, and c_outputs_1 is correct,why? what can lead to this problem?please help me ,thanks very much!!!I have upload the report.txt and onnx model in the attach.
Hello,im trying to implement an ai project that uses two different ai models in one pipeline.The output from model A should be the input for model B.The question that im asking would be how im able to combine the two models within one project in my STM32CubeIDE in order to implement such pipeline where A is the input of B. Or rather the output from A triggers B.Any help is appreciated!Kind Regards!
Hello! How can I store the model's input data in the flash of the STM32N6570-DK, then deploy the model, read the input data from flash, and perform inference? Are there any relevant tutorials for this? I previously followed the model deployment tutorial in the link below. Can this deployment method support reading input_data directly from flash? If not, are there alternative approaches to achieve this goal? Thanks.https://stm32ai-cs.st.com/assets/embedded-docs/stneuralart_getting_started.html
Hello, I'm working with a NUCLEO-N657X0-Q Board and trying to run/debug a TensorFlow Lite model that has been quantized to int_8 to run on hardware. I've tried several approaches but every attempt leads to a dead-end of one error leading to three more. Any help with any of these approaches would be greatly appreciated. What I've tried so far (every tool used is the most recent version - up to 07/01/25): 1. Building STM32 CubeIDE project in CubeMX using the X-CUBE-AI extension I first tested the model by uploading and using Analyze Model in CubeMX, which gives good results, showing a correct number of weights, activations, layers (all running on HW). Validate On Desktop works and gives expected results, but Validate On Target throws the following errors: E200 (ValidationError): stm32: Unable to bind the STM AI runtime with "network" c-model: [] E801 (HwIOError): InvalidFirmware Besides this, generating the code and trying to build leads to several linker errors w
Hi,I'm working on a NUCLEO-N657X0-Q board with all the newest software releases. The model I've uploaded stalls on one epoch forever while debugging or running the app. I'm trying to debug the following generated inference loop (in app_x-cube-ai.c file) of the X-Cube-AI application generated with CubeMX for a TFLite model quantized to int_8 (also attempted with ONNX-converted model):void MX_X_CUBE_AI_Process(void) { /* USER CODE BEGIN 6 */ LL_ATON_RT_RetValues_t ll_aton_rt_ret = LL_ATON_RT_DONE; const LL_Buffer_InfoTypeDef * ibuffersInfos = NN_Interface_Default.input_buffers_info(); const LL_Buffer_InfoTypeDef * obuffersInfos = NN_Interface_Default.output_buffers_info(); buffer_in = (uint8_t *)LL_Buffer_addr_start(&ibuffersInfos[0]); buffer_out = (uint8_t *)LL_Buffer_addr_start(&obuffersInfos[0]); LL_ATON_RT_RuntimeInit(); // run 10 inferences for (int inferenceNb = 0; inferenceNb<10; ++inferenceNb) { /* ------------- */ /* - Inference - */ /* -------------
Hello,i am trying to use the NPU on the N6 by creating a project with CubeMX/X-Cube-AI. After creating the project i am greeted by a lot of errors (30). I don't change any of the code after code generation. So my question is, is X-Cube-AI with NPU even working? I see a lot of posts in the forum where some have managed to compile a project which is generated by X-Cube-AI. Any help is welcome.
@stm@Julian E. I get the following error.Attached are the model and npz files for quantization. Quantization with int8 shows following errors: Executing with: {'model': '/tmp/quantization-service/280b5700-3751-4fba-a647-f57a80bf0b73/stm32_mnist.keras', 'data': None, 'input_type': tf.int8, 'output_type': tf.int8, 'optimization': <Optimize.DEFAULT: 'DEFAULT'>, 'output': '/tmp/quantization-service/280b5700-3751-4fba-a647-f57a80bf0b73', 'disable_per_channel': False}Only h5 file is supported2025-08-16 21:27:05.333202: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.2025-08-16 21:27:05.333800: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.2025-08-16 21:27:05.336349: I external/local_xla
Hello all,im currently trying to fine tune a mobileNetV2 model that is pretrained on imageNet on my own dataset.However when im adapting the user_config.yaml i dont know how to switch between mobileNetV2 1.0 and mobileNetV2 1.4 as i would like to see the difference between those versions in inference, accuracy and size.Heres my code block for the training of the user_config.yaml later used by the stm32ai_main.py script:training:model:name: mobilenetversion: v2alpha: 0.35pretrained_weights: imagenetinput_shape: (224, 224, 3)frozen_layers: Nonebatch_size: 32epochs: 100dropout: 0.3optimizer:Adam:learning_rate: 0.001callbacks:ReduceLROnPlateau:monitor: val_accuracyfactor: 0.5patience: 10EarlyStopping:monitor: val_accuracypatience: 40I didnt find any paramter that actually determines if the mobileNetV2 is version 1.0 or 1.4...Kind regards!
Hi there,I am newbie at edge AI, and I was runing the demo "motor vibration" in nanoEdgeAI.For me, the nanoEdgeAI is really a excellent work, I can easy understand the most part of the work flow by run an demo, even I am just a new guy.However, when i ran the demo, and I want to launch the execution time of the special library, the error as below is present:I have tried to launch a few others library's execution time, but the error is same.I don't know what happened, could anyone tell me why and how could I get the information I need.Any help is welcome, thanks for your help!
I am using STM32N6570-DK board.I wanted to use resnet50 model for Image Classification I generated files using stedgeai using the command : stedgeai generate --model resnet50_v2_224_int8.tflite --target stm32n6 --st-neural-art default@user_neuralart_STM32N6570-DK.json --input-data-type uint8It generated the correct files.When I tried to compile the generated files , the version of aton library is a new one 1.1.1.14 where the code of ImageClassification contains 1.1.0.31 due to which the code is not getting compiledFrom which location can I get the latest files for ll_aton libThanks & Regards,Sandeep
Hi,I'm using the STEVAL-STWINKT1B and the automode to log data, with the FPSNSDATALOG2 firmware. I'm reaching out because, although the logger seems to run for multiple hours, I only get a few minutes (or at best a couple of hours) of data saved on the SD card.Here’s what I did:I charged the dev kit's battery for about 7 hours. Before logging, the ST BLE Sensor app showed the battery level at 95%.I formatted the SD card to FAT32 with a 32K allocation size.I copied the following device_config.json to the root of the SD card:nof_acquisition = 0logging_period_s = 900 (15 minutes per file)I started the logger by pressing PWR and RESET. The green LED blinked at 4Hz, indicating logging had started.I monitored the logger as much as possible. After 8 hours, the green LED was still blinking, and the ST BLE Sensor app showed:Alarm: Logging ongoingBattery: 55%(see screenshot below)However, when I checked the SD card, I only found about 2.5 hours of data, specifically, 10 folders of 15 minutes eac
Hello,i want to adapt the STM32N6GettingStartedImageClassification Project (https://github.com/STMicroelectronics/STM32N6-GettingStarted-ImageClassification/tree/main) with a second model, so i can build a proper ai pipeline.The coding isnt the problem currently. However im facing problems when trying to add a second model to the stm32cubeide application.I noticed a stmaic_STM32N6570-DK.conf file, that seems to configure the project structure and manages the flash calls for the binaries.And i thought adding the new files from the second model would maybe adapt the project so it adds the model to the cubeIDE Project which it obviously didnt.So my question is:What do i have to do in order to add a second model to the stm32CubeIDE Project? Is there a simple trick to achieve that or do i have to add the model manually to the include paths in the Project Properties?Kind regards!
Hi,Currently, I want to use TFLM library to do the inference rather than Cube.AI. For me, what I am doing is:1. download the latest tflm library2. build it with commands: "make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m33 OPTIMIZED_KERNEL_DIR=cmsis_nn microlite"3. Create a new project in STM32IDE and copy above-built-in tensorflow and third-party folders into the project4. include all needed header files in tensorflow and third-party folders Is the above process correct? I tried for multiple times but it always show that "missing some files in tensorflow folder". Do you have any suggestions?Thanks in advance
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.