cancel
Showing results for 
Search instead for 
Did you mean: 

Request for Source Code for fill_buffer Function in Sample App Main.c

NHaki.1
Associate

Dear ST Community Support,

I hope this email finds you well. My team and I have been working with theSTEVAL-PROTEUS1 and have successfully utilized the STMicroelectronics NanoEdge AI Studio to create an Anomaly Detection (AD) model for our project. As a result, we have obtained the .a and .h files, as well as the sample app main code.

We are now in the process of integrating the AI library into our application, and we require some assistance. In the provided sample app main.c code, there is a function called fill_buffer(input_user_buffer) that seems to be responsible for filling the buffer with sensor data. Unfortunately, we could not locate the source code for this function.

We kindly request your assistance in providing the source code for the fill_buffer(input_user_buffer) function, as this will help us understand how to properly manage and process the sensor data in our application. This information will be invaluable in ensuring that our deployment proceeds smoothly.

Thank you in advance for your help and support.

Best regards,

Nabih

1 REPLY 1
Julian E.
ST Employee

Hi Nabih,

Thanks for your message,

In the provided code, there is indeed a function called fill_buffer: it is just indicating that you need to create a function to collect the data from your sensor. This function depends on the ST board and the sensor you are using.

The good news is that we provide a github repository where we have some sample anomaly detection projects for multiple boards (STEVAL-PROTEUS1 included) with the data logging code. You can find the repository here: 

stm32ai-nanoedge-datalogger/Projects/STEVAL-PROTEUS1/STEVAL-PROTEUS1_IIS3DWB at main · stm32-hotspot/stm32ai-nanoedge-datalogger · GitHub

Everything is explained, you just need to clone the project and open the STM32CubeMX of the board and sensor you are using. Then include the .a and .h files you got from NanoEdge AI Studio and perhaps adapt some of the code to suit your needs.

I’ll be happy to answer any other questions you might have,

Best regards,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.