WATCH ON-DEMAND | STM32 Summit 2026
Ask questions and find answers on how to deploy, debug, and optimize AI models on ST microcontrollers, microprocessors, and smart sensors.
Most recent activity
Hi, I have been trying to deploy simple neural networks.tflite on the STM32 N657X0 board, by applying the XCUBEAI, running under NPU.While, I have not made it work yet. If anyone has such project or docs to share, It would be highly appreciated. Best,Han
Hello,I am working with the STM32N6570-DK board and running the STM32N6-GettingStarted-ObjectDetection example. When I debug the program in CubeIDE (The MCU runs in Dev mode), I encounter the following issue:In the main loop, when the function LL_ATON_RT_RunEpochBlock is called, the debugger reports:Target is not responding, retrying...At this point, pressing the NRST button on the board does not reset the MCU. The only way to recover is to power cycle the board.Any suggestions would be greatly appreciated.Thanks in advance!
Dear all,I'm in the process of converting a convolutional neural network from quantized ONNX format to run on the STM32N6 Neural ART NPU, using the STEdgeAI tool. I do not have access to external RAM on our custom hardware, so everything has to fit in the NPU's RAM (AXISRAM3 to AXISRAM6). However, I found it frustratingly difficult to do so using the STEdgeAI CLI. Using just the default options results in a model that takes roughly twice as much RAM as would theoretically be needed to store the activations (and in some extreme cases even 10x as much).So my question is: are there any tips, tricks, or tools or other command line options that are useful when trying to squeeze a model into the small internal RAM? It looks like the "out-of-the-box" options to STEdgeAI-CLI prioritize execution speed over RAM usage, which is of course unfortunate if that means the model cannot run at all due to RAM restrictions.In particular:Is there a mode where one gives STEdgeAI (or the Neural ART compiler
Dear all,I'm converting a quantized ONNX model using the STEdgeAI Core CLI, for use on the STM32N6 NPU. However, I cannot explain the very high RAM usage for the activations, as reported by stedgeai.The network is a simple CNN with 10 convolution layers each followed by a ReLU. I have attached the original (not quantized) model to this post (mvs_model.onnx, see also image below) as well as the quantized version (mvs_model.quant.onnx). Quantization was performed using the ONNXRuntime tools.When generating code for the N6 NPU (using "stedgeai generate --target stm32n6 --st-neural-art O3@neural_art.json --model mvs_model.quant.onnx --input-data-type uint8 --name mvs" with neural_art.json and stm32n6.mpool as attached) the CLI reports crazy high RAM usage for the activations (full output attached as stedgeai_output.txt): Requested memory size by section - "stm32n6npu" target ------------------------------- ------- ------------ ------ ------------ module text rodata data bss
Hi! My situation is the same as post provided here: https://community.st.com/t5/edge-ai/getting-error-quot-analyze-fail-on-the-ai-model-quot/td-p/55309Is there any solution to this problem? Also, I am using the STM32F407G-DISC1 board with a Mac with M3 Pro Chip.Thanks!
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!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.