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
Hopefully someone can give me a hint on what I am doing wrong.I am logging sensor data with the STEVAL-PROTEUS1 board to the PC using the fp-sns-datapro1 project and the cli_example method. When I try to convert the binary .dat to .csv of the ISM330DHCX by using the HS-DL_NanoEdge_Conversion.bat the hsdatalog_to_nanoedge.py script rises and exception at line 102HSDatalogApp.st_hsdatalog.HSD.HSDatalog_v1 - ERROR - Memory Error occoured! You should batch process your ...It also crashes when converting IIS3DWB .dat, but data logged from IIS2DLPC and SST22H sensors are converted correctly.I have also tried to convert the example samples provided in directory STM32CubeFunctionPack_DATAPRO1_v1.1.0\Utilities\SwUtilities\HS_Datalog\PROTEUS_batch_file_examples\AcquisitionExample and the same behaviour occurs.I am using python 3.8 and fp-sns-datapro1 version 1.1.dat collected by bluetooth via STSBLESens App or by USB in MSD mode have also the same problem.Best regards
Hi, I'm using the B-U585I-IOT02A development board and I have some problems using external memories with AI. The board has an external PSRAM memory in OCTO SPI and a NOR FLASH in OCTO SPI (quad?) but this seems impossible to use with X-Cube-AI. I am stuck today and I cannot find the information through the various documents that I have seen on internet. 1. Is it possible to use OCTO-SPI PSRAM to extend RAM for AI ?On ST cloud developer, all boards with OCTO-SPI PSRAM seem not to work to expand RAM. On the AI configuration window in CubeMX, it is impossible to choose PSRAM memory because it's not "physical" memory.I made different attempts, I set the PSRAM in Memory Mapped Mode, I assigned it in the linker, I assigned the AI activation buffer on the PSRAM, but in addition to being slow, the AI results are incorrect. I know there is a time between a valid write and a read, is this the problem ? 2. How to program the model binary into OCTO-SPI External NOR Flash ?
I am trying to implement a neural network on the LSM6DSV16IS IMU using an X-NUCLEO-IKS01A1 board.The neural network was trained and exported from MATLAB in ONNX format. Subsequently, the model was quantized using ST Edge AI Developer Cloud, and I downloaded the generated library for the IMU.I referred to the following tutorials as guidelines:How to implement a neural network on LSM6DSO16IS and ISM330ISST MEMS ISPU GitHub repositoryHowever, I encountered some differences in my case and decided to download the template (I tried both template and template_stedgeai).I modified the main.c file in inspu/src/main.c, but it fails to compile. On the other hand, when I try to compile the file in inspu_stedgeai/src/main.c, the console outputs: "Nothing to build for project ispu_stedgeai".At this point, I am unsure how to proceed.My main questions are:Is it possible to use ST Edge AI Developer Cloud to directly obtain the three folders (lib, inc and src) that can be integrated into the project in
Hello everyone: I encountered a problem when importing the ONNX model and using the X CUDE AI tool for analysis. I have tried many solutions but couldn't solve it. I hope someone here can help me. The specific problem is as follows: ST Edge AI Core v1.0.0-19894 NOT IMPLEMENTED: Only step=1 is supported for each axis: [2] This is a problem that occurred after adding the SPDConv module to the YOLOv5 model. Before that, the model could be imported and analyzed smoothly.
Hi,I am using STM32MP257-DK2 microcontroller on a Linux PC and I am trying to analyze a AI-model using the CubeAI. But I keep getting the following error:I have already installed the MP2 component, SDK and everything (including the CubeMX and CubeAI) is upgraded.Verification of installed STM32MP2 component:The package is green, indicating installed and has the "uninstall" option.Any suggestions on how this error can be fixed?
Hi,I am following this tutorial to use my own image recognition model with the STM32H747I-DISCO board. I have already ran the demos and they seem to work fine.I first configure the model in CUBE-MX successfully and then copy the required files to the demo project.When I compile the code in the STM-IDE I get the following error a bunch of times:undefined reference to `forward_conv2d_if32of32wf32'I also get this: STM32H747I_DISCO_PersonDetect_Google_CM7.elf section `.bss' will not fit in region `DTCMRAM' STM32H747I_DISCO_PersonDetect_Google_CM7.elf section `.axiram_section' will not fit in region `AXIRAM' STM32H747I_DISCO_PersonDetect_Google_CM7.elf section `.sram_section' will not fit in region `SRAM123' section .axiram_section VMA [24000000,241ad7ff] overlaps section .bss VMA [20017a40,2c6301a7] even though CUBE-MX said that the used memory is within the flash and ram available (as shown in the image included). The declaration is in layers_conv2d.h but I can't
When I analyze the ONNX model in CubeAl,it says INTERNAL ERROR : Unkonwn dimensions : CH.The code of the model is simple as follows,input_size = 1 hidden_size = 1 output_size = 1 num_layers = 1I don't know why and I will really appreciate any advice or workarounds. Thank you:class LSTMNet(nn.Module): def __init__(self, input_size, hidden_size, output_size, num_layers=1) super(LSTMNet, self).__init__() self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=False) # batch_first=False self.fc = nn.Linear(hidden_size, output_size) def forward(self, x): h0 = torch.zeros(num_layers, x.size(1), hidden_size).to(x.device) c0 = torch.zeros(num_layers, x.size(1), hidden_size).to(x.device) out, _ = self.lstm(x, (h0, c0)) out = self.fc(out[-1, :, :]) return out
This ONNX model is compiled with a standard MCU and runs on it (both with and without quantization). However, I encounter the following error when using the Neural-ART Accelerator NPU (both with and without quantization):INTERNAL ERROR: Scale, zero-point, and quantizer must be set simultaneously. It seems to me that all the model's onnx operations are supported (https://stedgeai-dc.st.com/assets/embedded-docs/stneuralart_operator_support.html)
Hello everyone! First post here. I'm a grad student in Computer Science and Engineering and I'm looking to learn Machine Learning on MCUs. My professor suggested I use the STM32 Nucleo development boards for this. I was wondering if anyone had a rough guideline and perhaps links to some resources which you found really useful on how to get started with this topic. I would be really grateful for any help. Thank you!
I am using X-CUBE-AI 9.0.0 in my project and need to run a quantized mobilenet_v2.0.35 model (.tflite). The model takes 4*56*56*3 (Batch * width * height * channel) input, but I am unable to find a way to run it with that input shape. The generated code sets input _1 size to 56*56*3 bytes only. I can't figure out how to provide batch input.I am using STM32CubeAI runtime. I also see differences in input/output parameters between the original model and the one optimized by X-CUBE-AI.I'd highly appreciate any guidance about how to run inference using batches. I am attaching the Netron screenshot of the comparison below: Comparison between original (left) and optimized model EDIT: In the generated report file, I can see batch size 4 is used in the layer breakdown table. But input and output size don't show that. ----------------------------------------------------------------------------------------------------------------- input 1/1 : 'serving_default_input_10', uint8(1x56x5
Hi everyone,In X-CUBE-AI, it provides two different runtime, TFLite Micro and STM32Cube.AI. When I checked the used kernel by TFLite Micro, it seems that it doesn't use the optimized kernel from CMSIS-NN. For the case of STM32Cube.AI, we can't find how it implements the kernel because it is not open-source. However, we can guess it actually uses CMSIS-NN for the implementation because its latency is much shorter than TFLite Micro.My question is: does anyone know how to let TFLite Micro use CMSIS-NN library when using X-CUBE-AI package to generate related C-files?Thank you very much for your assistance and reply.Best regards,Jeff
We are using the Nano Edge studio to run the STWIN DTMF Classifier on the STEVAL-STWINCSV1 on a Linux system. We followed the instructions from: https://wiki.st.com/stm32mcu/wiki/AI Entitled: How to create a dual-tone multi-frequency classifier using NanoEdge AI Studio When we run and capture 100 lines of samples, we move to the "Import Signal" and 99% of the data is misaligned and classed as corrupted. We have a space as our separator, but we need a new line to separate each line and this causes corruption. We also noted that on occasion we have, as an example, 0.0.000. We have tried modifying the code in the classifier example: for( uint16_t class_cpt = 0; class_cpt < CLASS_NUMBER; class_cpt++ ){printf( " %.3f", output_class_buffer[ class_cpt ] );}printf( "\n" ); But no matter how we format the code the date is always classed as corrupt. We are unable to use the button to "Open file location" as it does nothing. 1) Could you please tell us where we would find the outp
As stated, I have problem analyzing the ONNX model ported from a pytorch model. The code of the model is simple as follows: class LSTM(nn.Module): def __init__(self, input_size, hidden_size, num_layers, num_output=1): super(LSTM, self).__init__() self.num_layers = num_layers self.input_size = input_size self.hidden_size = hidden_size self.num_output = num_output self.lstm = nn.LSTM(input_size=input_size, hidden_size=hidden_size, num_layers=num_layers, batch_first=True) self.fc = nn.Linear(hidden_size, num_output) def forward(self, x, device='cuda'): ula, (h_out, _) = self.lstm(x) out = self.fc(h_out[-1]) return out Netron vis:I will really appreciate any advice or workarounds. Thank you!
Hi ,I go into the hardfault handler when trying to run the ai_network_run which I call inside my run_inference function which is inside my ADC ISR , then it calls ai_platform_network_process , that is where we get thrown into the HardFault Handler . here is my code in case anyone has improvements please don’t hesitate to reply .Note : I tried all the previously mentioned suggestions like clocking CRC and increasing stack size , I increased both stack size and heap size to 0x8000 . /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this
I built a simple FCNN model based on onnx(regression, 4 input and 4 output), including three hidden layers with 64, 32, 16 nodes, and successfully "validate on target" in STM32 through X-CUBE-AI.Now I want to send(receive) data directly to(from) the STM32 via the serial port, instead of clicking the button "validate on target". However, I don't know how the data from the npy file was sent during the "validate on target" process. Is there any documentation to explain the process?
When I used V4.3.1 before, there was a "5 Emulator" step, but it doesn't exist in V4.6.0.Is Emulator no longer available?
Dear community members,Here’s your chance to win some prizes from ST until the end of 2024! You can join the challenge by sharing your ISPU neural network implementation. We’ll provide instructions and hints during the ISPU webinar held on October 29, 2024. https://content.st.com/iot-applications-with-neural-networks-in-mems-sensors.html Your proposal must relate to embedding a neural network on an ST MEMS sensor with ISPU.The ISPU is an ultralow power, computationally efficient, high-performance programmable core that can execute signal processing and AI algorithms in the edge. It is available in the LSM6DSO16IS and ISM330IS sensors from STMicroelectronics. Simply create a comment in this thread. You can also attach files to document your solution (.log, .mp4, .docx, .jpg, .png, .xlsx, .7z, .hex, .c, .cpp, .zip). Use the “kudos” button on ideas or implementations from other members to indicate that you like them. Everybody can vote on implementations and ideas, and the most voted on
I am trying to use MEMS Studio to configure the Machine Learning Core (MLC) of the ISM330DHCX sensor on both the B-U585I-IOT02A and a custom board, but after installing MEMS Studio and connecting the board, I realized that it is not recognized by the software. How can I use MEMS Studio with a board that is not on the supported list? If this is not possible, what is an alternative way to utilize the MLC functionality of the ISM330DHCX? *This post has been translated from Korean to comply with the ST Community guidelines.
I was able to run the Serial emulator in NANOEDGE AI STUDIO Validation, so as the next step, I run [COMPILE LIBRARY] in Deployment and don't know where to put the libneai.a file generated in Project Explore.Also, please let me know if any other settings are required.The evaluation board is B-L475E-IOT01A2.
Hi everyone,I am working on implementing an image classification model on an STM32 board using the X-CUBE-AI extension. I am relatively new to embedded software development; my background is primarily in AI and deep learning. While I have managed to generate the necessary .c and .h files for my model using the X-CUBE-AI extension, I am having trouble providing input to the model from an image stored on an SD card. As far as understand from created cods I have modify acquire_and_process_data and post_process functions that have write down below. Also I have provide output of my code. In main function just MX_X_CUBE_AI_Process function works in while for AI proces.Here’s a brief summary of what I’ve done so far:Model Conversion: Successfully converted my image classification model using the X-CUBE-AI tool and generated the necessary files.SD Card Integration: Implemented functions to read BMP image files from the SD card and store them in a memory buffer. These functions
The STM32N6 has been officially launched yesterday at the STM32 Summit! The STM32N6 is based on the Arm® Cortex®-M55 running at 800 MHz. It is the first STM32 MCU to embed the ST Neural-ART accelerator™, an in-house developed neural processing unit (NPU) engineered for power-efficient edge AI applications. A dedicated computer vision pipeline with a MIPI CSI-2 interface and image signal processing (ISP) ensures compatibility with a wide range of cameras. The STM32N6 also features an H264 hardware encoder and the NeoChrom™ Accelerator for graphics, making it suitable for feature-rich products. 4.2 Mbytes of contiguous embedded RAM are also offered, ideal for neural networks or graphics applications, complemented by high-speed external memory interfaces (hexa-SPI, OCTOSPI, FMC). The full AI ecosystem is out as well! ST Edge AI Core v2.0: introducing the STM32N6 with Neural Art, and also the Stellar P ST Edge AI Developer Cloud sup
Hi,We are trying a very simple deep neural network model with 20 inputs and 3 outputs and want to generate inferences in real-time. We are following the instructions from the document "Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI)" numbered UM2526 with X Cube AI 7.1.0 with STM32CubeMX.Has anyone encountered the same error?Thanks in advance.
I am currently using the STM32 Edge AI Developer Cloud to convert my ONNX model, which I built using PyTorch.The ONNX model is attached for your reference.I would greatly appreciate your guidance on this matter, as it is blocking my research.Thank you for your assistance.
Dear Sir/Madam,I have a trained CNN model converted to .TFlite file. The file has been analysed and validated on PC and Target. All are correct. Then an application template was developed. When I tried to run initiate CNN model with generated function " static int ai_boostrap(ai_handle *act_addr)", there is issue in this layer:ai_bool cnn1_configure_activations(ai_network* net_ctx, constai_network_params* params) (Can not go deep anymore). Always return false. From ai_cnn1_init() returned an error type 48 and error code 19 as shown in the screenshot attached.Would you please help me sorting out this issue? QSAppendix:AI_DECLARE_STATICai_bool cnn1_configure_activations(ai_network* net_ctx, const ai_network_params* params){AI_ASSERT(net_ctx) if (ai_platform_get_activations_map(g_cnn1_activations_map, 1, params)) {/* Updating activations (byte) offsets */ serving_default_Combined_Input0_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 632);serving_default_
..
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.