Skip to main content
ShivaRagu
Senior
May 13, 2021
Question

SensorTile Box- Steval Mksbox1V1

  • May 13, 2021
  • 11 replies
  • 2873 views

Hi,

Am trying to generate the C-code for the ASC (Acoustic Scene Classification) model from the FP-AI-SENSING1 Pack through Stm32cube mx. But I can see there is changes in the code between existing code and the new code which was generated by me. I dont know whether I have not done the correct procedure in MX.

It would be really helpful, if I get some procedure for SensorTile Box (Steval-Mksbox1v1) for the ASC to work in MX, because I can see some of the tutorial videos and data briefs is for the eval board " B-L475E-IOT01A1" not for sensor tile box.

As per my understanding, If am generating the C-code from the model from FP-AI-SENSING1, I should get the same code which is already in function pack.

Regards,

shankari.

    This topic has been closed for replies.

    11 replies

    niccolò
    ST Employee
    May 13, 2021

    Hi shankari @ShivaRagu​ ,

    I'm not sure I understood your situation, but let me try to get it right

    let's considerate the .c file you generated by feeding STM32CubeMX.AI with the .h5 model file and the one in the project.

    you are saying that they are different, but how much are they different?

    I mean that few differences are normal, because the file in the project was generated some times ago, and the version of CubeMX changed, so there could have been some tweaks and improvements in the AI files generation too.

    so, if the number of inputs and outputs are good, I would try to run the code and check if it works, because the networks could be really similar.

    while, if the files are much more different than what they should be, we can further investigate

    Niccolò

    ShivaRagu
    ShivaRaguAuthor
    Senior
    May 13, 2021

    Hi,

    Thanks for the reply. I have attached my C-generated code file for the Acoustic scene classification from the sensing pack. Actually, If I run this code in IDE am not getting any error but after I flashed that into my device, the Bluetooth is not getting detected and am not able to connect it with my android app. That's the reason am trying to replace only the newly generated asc.c, asc_data.c and asc.h, asc_data.h into the function pack (FP-AI-SENSING1) and tried to run that code in IDE. There am getting errors.

    After creating the TFlite model, I have followed the below steps in CubeMX.

    1. Selecting my board-- STEVAL MKSBOX1V1 and initialize all peripherals with default mode.
    2. Selecting "Software components-->X-cube-AI-->core and in "Application"---> Validation.
    3. Then am uploading my TFlite model and make analyze and validate on desktop.
    4. In connectivity, enabling USART--->"Asynchronous" .
    5. Then in parameter settings--> COM port-->"USART Asynchronous" and "USART1".
    6. Then generate code.
    7. Then in IDE, am trying to build and run the program into my device.

    Am I missing anything during C code generation.

    regards,

    shankari.

    ShivaRagu
    ShivaRaguAuthor
    Senior
    May 17, 2021

    Hi any update on this.

    niccolò
    ST Employee
    May 25, 2021

    Hi shankari @ShivaRagu​ ,

    I'm glad you could find the issue

    let's keep up the good work with your project

    Niccolò