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
https://community.st.com/t5/stm32-mcus/how-to-build-an-ai-application-from-scratch-on-the-nucleo-n657x0/ta-p/828502There was a problem while following this guide.In dev mode, the signed binary files are programmed in cubeprogrammer and re-run in flash mode, and the blue light remains on. (The FSBL main() runs normally)I set BOOT_Application() to breakpoint through CUBEIDE and debugged line by line.An error occurred in img_size = BOOT_GetApplicationSize(uint32_t) source for CopyApplicationsource:<error: Cannot access memory at address 0x70100000>destination:<error: Cannot access memory at address 0x24050000>I have confirmed that there is an error.0x70100000 I programmed the signed application file in that areaWhat is the reason for this problem?
Hi,In STM32N6570-DK_GettingStarted_ObjectDetection project when I add another uint8 model it is stopping at app_postprocess_od_st_yolox_ui.c and it is moving to hard fault 1. I am unable to start with camera in my new project. So I am using STM32N6570-DK_GettingStarted_ObjectDetection project to deploy customising model. but when I quantise the model using CLI, I am unable to run the code it is going to hard fault.
Can I use MMAction2 with TSN or SlowFast behavior recognition models and deploy them to the STM32MP257? Does the STM32MP257 support 3D CONV operators?
The examples/code snippets found in the ST Edge AI Core Technology Documentation (ST Edge AI Core Technology 2.2.0) show a variety of functions/macros used that don't seem to get generated via STM32CubeMX on my end.For reference, I generated the code for CMake, with version 10.2.0 of X-Cube-AI and 6.13.0 of STM32CubeMX.A couple examples from the legacy client -> new edge ai embedded client migration guide:#include "network_inputs.h" - No such file <model_name>_inputs.h seems to get generated via CubeMX.STAI_NETWORK_CONTEXT_DECLARE - this macro is undeclared in the generated code.stai_network_init() - I get an implicit declaration of function warning for this one (cannot find this declared/defined anywhere in the generated code).STAI_NETWORK_ACTIVATIONS_NUM - also undeclared in generated code. Is this specific to the code generated for CMake? Are there perhaps other header files I should be looking to include aside form the ones noted in the examples? EDIT: Confirmed
Hey,Looking at the image classification application example, I couldn't find any part of the code that handles the normalization of pixel value from [0,255] to [-1,1] or [0,1] that I would expect from a CV model of that kind. Do you mind explaining how this implementation that is based on the mobilenet_v2_0 skips the need for normalization?Thanks.
Hello,I'm trying to convert my keras model for STM32N6. CubeMX Version: 6.15.0X-Cube-ai Version: 10.2.0The code for my model:img_input = Input(shape=(10, 141, 141, 3), name='img_input') # --- CNN branch applied per-frame via TimeDistributed --- cx = layers.TimeDistributed(layers.Conv2D(16, (3, 3), activation="relu"), name="CNN_Conv1")(img_input) cx = layers.TimeDistributed(layers.BatchNormalization(), name="CNN_Batch_Norm")(cx) cx = layers.TimeDistributed(layers.MaxPooling2D(2, 2), name="CNN_Pool1")(cx) cx = layers.TimeDistributed(layers.Conv2D(32, (3, 3), activation="relu"), name="CNN_Conv2")(cx) cx = layers.TimeDistributed(layers.MaxPooling2D(2, 2), name="CNN_Pool2")(cx) cx = layers.TimeDistributed(layers.Conv2D(64, (3, 3), activation='relu'), name="CNN_Conv3")(cx) cx = layers.TimeDistributed(layers.MaxPooling2D(2, 2), name="CNN_Pool3")(cx) cx = layers.TimeDistributed(layers.Flatten(), name="CNN_Flatten")(cx) cx = layers.TimeDistributed(layers.Dense(128, activation='relu'),
I am working on a project where I am required to deploy a Neural network on STM32 Nucleo- H755ZIQ. And I feel stuck because I am unable to properly run it on the board using Stm32CubeIDE with X cube ai. I downloaded the .ioc file and the project files from ST Edge AI Developer Cloud but I could'nt figure out how to properly flash it on the board and verify it. I also cant seem to figure out the clock configuration, usart, and I dont know how to access a serial monitor on mac. I have .csv files to test the model on the board, but I cant figure out where to insert the file for testing. I tried using Simulink hoping it'll be easier but the stm32 hardware support package is not supported on MacOS(M1). Can anyone help me out figuring out the pipeline to deploy this model? I am fairly new to stm32 MCUs and have limited experience in embedded.It is a Keras model which takes in ECG data in string arrays and classifies it. Right now I am only feeding the model with .csv file
Hello, I installed X-CUBE-AI 10.2.0 from STM32CubeMX in STM32CubeIDE 1.18.1. After enabling X-CUBE-AI in the ioc file and performing code generation, the folders /Middlewares/ST/X-CUBE-AI/Inc and /Middlewares/ST/X-CUBE-AI/Lib are created, but no code is generated in those folders. Therefore, when building the project, I get an error such as:fatal error: ai_platform.h: No such file or directoryIn Project Manager → Code Generator → Generated files panel, I unchecked the option “Delete the previously generated files when not regenerated” and regenerated the code, but the problem was not solved. Please help me.If there is any necessary information that I have not provided, please let me know.This message was translated into English using generative AI. I apologize for any awkward sentences or expressions.Thank you.
Hello - I'm quite new to the world of ML and machine learning on embedded and I'm having trouble implementing a model I've trained on the board. It is a hand gesture recognition model and the point was for me to understand the whole ML development process by training and deploying a model from scratch. I have been referencing this article: How to build an AI application from scratch on the... - STMicroelectronics Community and have followed all the steps. I tried once using a model from the model zoo and it worked fine but when trying with my own model it hits a hardfault and halts execution - so I'm guessing it is an issue with my model. I've attached a zip file of my project and a zip of the notebook file and exported model (i actually ended up uploading the keras model to ai developer cloud and quantising/optimising the model in there, so ignore this part in the notebook).Another issue I've been having lately is regeneration of code with cube mx - I generate code for the f
RAM Overflow and X-CUBE-AI Quantization Analysis Error with PyTorch Model on STM32F401REHello everyone,I'm working on deploying a PyTorch model to an STM32F401RE NUCLEO board and encountering some challenging memory and quantization issues that I hope the community can help me resolve.Project ContextMy project involves running a custom PyTorch model (converted to ONNX format) on the STM32F401RE NUCLEO board. The system already has USB Host (Audio Class) library and FreeRTOS integrated as essential components for my application, which means I need to work within the remaining available memory space.Development EnvironmentBoard: STM32F401RE NUCLEO (96KB SRAM)IDE: STM32CubeIDE 1.18.1X-CUBE-AI: 10.2.0Additional Libraries: USB Host (Audio Class), FreeRTOSModel: PyTorch → ONNX convertedProblem 1: RAM Overflow During BuildWhen I configure X-CUBE-AI with compression set to high and optimization set to ram, the build process fails with a linker error:C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugi
Hello,I’ve been working on a project inspired by STMicroelectronics project, where the goal is to identify different operation modes of a power drill — such as drilling, screwing, and idle — using motion sensor data.I’m using one of ST’s development kits (e.g., STEVAL-STWINKT1B) and built my classification model using NanoEdge AI Studio.System Overview:Data Collection:I collected 20 signal recordings per class, each consisting of approximately 200 rows of sensor data.Sensor Preprocessing:The raw data from the accelerometer and gyroscope is passed through multiple filters to improve signal quality:Low-pass filterMoving average filterKalman filterDecision Mechanism (Sliding Window + Majority Voting):To improve classification stability in real-time, I implemented a sliding window with majority voting strategy:A buffer stores the last 50 predictions from the model.If at least 40 out of 50 predictions belong to the same class, that class is accepted as the current state.This helps prevent n
Hello,I am creating a new project on an STM32F4 nucleo board. I configured the X-CUBE-AI library as shown below and specified a TFLite model:When generating code on a fresh project, the "Middlewares" folder is not generated. The project fails to build because the "ai_platform.h" file is missing (it should be in the Middlewares folder). The problem occurs with a fresh STMCubeIDE project and with a fresh STMCubeMX project.I noticed that the "Middlewares" folder is generated correctly once I add additional libraries, such as FreeRTOS. In this case, both the FreeRTOS and the X-CUBE-AI code is generated correctly in the "Middlewares" folder. However, I don't want an RTOS for my application.How can I only generate the code for X-CUBE-AI?Best regards,kahuna
Hello,I have been conducting research for a while for a new project initiation. The project aims to design a smart access control system for 500 users using STM32. In designing this, we are implementing face recognition with FP_AI_FACEREC in the STM32H7 series and creating the display design with touchGFX. I have made progress in the project, and by adjusting the RAM settings of the face recognition library, I was able to accommodate 500 users. However, the library doesn't work at the desired accuracy level, especially when similar users are enrolled after reaching 50 users. It sometimes mistakenly identifies a user and allows access. This has raised doubts about the use of the H7 series, and I am considering selecting an MP135 series card for the processor. If someone is knowledgeable about this, could they provide information about the performance of the H7 and MP135 series for AI? Can we use higher accuracy models if we switch to MP135, or would we achieve similar performance as wit
I've implemented a multi-model face recognition system on the STM32N6 (originally based on the single model object detection demo) that efficiently runs detection and recognition models simultaneously on the NPU. Sharing the complete implementation since deploying and managing multiple AI models on the hardware has some non-obvious challenges.Detection Model: CenterFace for face detection (9ms inference)Recognition Model: MobileFaceNet (130ms per face)Pipeline Management: Efficient switching between models on the NPUAutomated Deployment: Script that takes model paths, names, and addresses as JSON elements and builds + flashes them automaticallyRepository: https://github.com/PeleAB/STM32N6-FaceRecognitionNext steps include creating an abstraction layer for JPEG and H264 compression to handle video streams more efficiently.Happy to discuss multi-model deployment strategies or NPU optimization approaches. The automated build system alone might save others significant setup time.
Hi everyone,I’m trying to deploy a wav2vec model using STM32Cube.AI and ran into an issue during onnx conversion.NOT IMPLEMENTED: Unsupported layer types: LayerNormalizationI’ve read the documentation at supported onnx operators and it seems that LayerNormalization is not currently supported.I have a couple of questions:Are there plans to support LayerNormalization in future releases?If not, does anyone know a recommended workaround other than just modifying the model to use another type of normalization?
Hi,I have got a TFlite model with s16 activations and s8 weights.1. Without NPU. I run this commandstedgeai.exe generate --target stm32n6 --name network -m %1 --compression none --verbosity 1 -O time --output ./X-CUBE-AIand the utility produces a network with "float" activations and weights (and adding int -> float at the start, and float -> int at the end).Can I use some command line options to force the utility to generate "integer" layers?2. With NPU. I run this commandstedgeai.exe generate --target stm32n6 --st-neural-art n6-noextmem@C:/Users/asdfg/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/10.2.0/scripts/N6_scripts/user_neuralart.json --name network -m %1 --compression none --verbosity 1 -O time --output ./X-CUBE-AI_NPU/Appand the utility outputs the error "NOT IMPLEMENTED: Unkonwn layer format for layer Input_0"With NPU, is it possible to use int16x8 TFlite models?Regards!
Hey,I have created a simple computer vision NN model and successfully deployed it on my STM32N6570-DK (original and quantized in the zip file).I want to "push" image files (to "emulate" the camera) from my computer to the board to run inference of the images on the board and get classification results and other information if possible.What is the quickest way to do that? Thanks in advance.
Hi everyone,I’m currently working on deploying a YOLOv8 model on the STM32MP25 using ST Edge AI. Here’s what I’ve done so far and where I’m stuck.Training & Export:from ultralytics import YOLO model = YOLO("yolov8n.pt") # medium variant model.train( data=path, epochs=50, imgsz=256, project="Training", name="yolov8n_run", save=True ) # Export ONNX model.export( format="onnx", imgsz=256, opset=10, dynamic=False, simplify=True, half=False, int8=False ) ONNX model details:Input: [1, 3, 256, 256], float32Output: [1, 5, 1344], float32I successfully converted it to .nb using:stedgeai generate --model best.onnx --target stm32mp25 This produces a model in float16 (I tried to run this but it did not work).Problem:STM32MP2 works with uint8 models, so I tried converting input/output to uint8: stedgeai generate --model best.onnx --target stm32mp25 --input-data-type uint8 --output-data-type uint8 This fails during compilation with:Fatal model compilation error: 512 Er
HI everyone,I have recently bought a STM32N6570-DK and I am trying to implement an example model from the Model Zoo on my board. I am able to get results and benchmark but when I go to Generate Your Project I am only able to Download C Code as seen in the image. How do I now use these files in the zip? In this tutorial, it says that "The .zip package contains all network .c and .h files, the Cube.AI runtime library files, and the stm32ai command line reports and output. Users can replace the existing files in their project with these newly generated files", however when creating a new project, I do not have these files. Are there any guides on how to integrate these files into a new project for the STM32N6570-DK? Any help will be much appreciated.Thanks!
Hello,I am currently working with the STM32N6570-DK and am studying several official example projects from ST's GitHub repositories. The projects I'm looking at are:ObjectDetection: https://github.com/STMicroelectronics/STM32N6-GettingStarted-ObjectDetection/tree/mainPeople Detection and Tracking: https://github.com/STMicroelectronics/x-cube-n6-ai-people-detection-trackingHand Landmarks: https://github.com/STMicroelectronics/x-cube-n6-ai-hand-landmarks/tree/mainI've noticed that the Binary/ai_fsbl.hex file is identical across all these projects, yet I cannot find any documentation or instructions on how to build this specific FSBL file from the source code.My main question is: How can I build this ai_fsbl.hex file myself?I've searched through the project folders but couldn't find a dedicated FSBL project. The only file I suspect might be related is ../../STM32Cube_FW_N6/Drivers/CMSIS/Device/ST/STM32N6xx/Source/Templates/system_stm32n6xx_fsbl.c, which is included in the main project's M
Hello, I am working with the SensorTile.box PRO and trying to connect it to a Raspberry Pi 4B over USB.On plugging the board into the Pi, it is detected in lsusb as: Bus 001 Device 003: ID 0483:5744 STMicroelectronics Sensortile.box_PRO_Multi_Sensor_Streaming However, Linux does not create a serial device such as /dev/ttyACM0 or /dev/ttyUSB0.This means I cannot access the device over a standard serial interface (e.g., minicom, screen, or pyserial). Additional observations: I attempted to communicate with the device using PyUSB on the Raspberry Pi. The device enumerates with an IN endpoint (0x81) and an OUT endpoint (0x06). When I attempt to send data to the OUT endpoint, I consistently get: usb.core.USBError: [Errno 32] Pipe error This suggests that the device expects a specific vendor-defined command format and does not accept generic bulk writes. Questions: Does the SensorTile.box PRO expose a CDC-ACM serial interface over USB,
Hello , I am trying to use a text detection model on STM32N6 . This is a CNN modelThe command used is : stedgeai generate --model custom_model.onnx --target stm32n6 --st-neural-art default@user_neuralart_STM32N6570-DK.json --input-data-type float32The error I get is : INTERNAL ERROR: Order of dimensions of input cannot be interpretedThe model is using the following operators :ConvReluBatchNormalizationMaxPoolConcatResizeIt was using Transpose operator , but I removed it from the modelCould you provide the possible reasons behind the error.Regards,Sandeep
Dear TeamHow can I implement Zoo models on the STM32N657-DK board?
Hi,On my test setup with the NN (MiniResNet model from STM32 Model Zoo),I observed the following behavior:Without calling LL_ATON_RT_Reset_Network() after each inference, only the first inference runs a few ms. All subsequent calls return almost instantly (execution time ≈ 0), and no inference is actually performed.With LL_ATON_RT_Reset_Network() invoked either before or after each inference (as in the example below), every inference is executed normally.Questions:1. Is calling LL_ATON_RT_Reset_Network() always required to ensure correct inference execution? Are there any cases where the LL_ATON_RT_Reset_Network() call is not needed?2. In the case of stateful neural networks (e.g. RNN), is it safe to call LL_ATON_RT_Reset_Network()? Will the network’s state remain intact, or is it cleared/reset as well? while(1){ /* ------------- */ /* - Inference - */ /* ------------- */ /* Pre-process and fill the input buffer */ //_pre_process(buffer_in); /* Perform the inference */
Hello everyone,I’m an embedded software engineer currently working with STM32 microcontrollers, and I am very interested in understanding how AI is being integrated into embedded systems.I would like to know:What are the common approaches or frameworks used to bring AI into embedded devices?What would be a good roadmap or step-by-step procedure to start learning and building AI-enabled embedded projects?My goal is to upskill into Embedded AI Engineering and eventually work on real-world AI applications on resource-constrained devices.Any guidance, resources, or personal experiences would be highly appreciated.Thank you!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.