Skip to main content
Visitor II
May 13, 2021
Question

SensorTile Box- Steval Mksbox1V1

  • May 13, 2021
  • 3 replies
  • 2836 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.

    3 replies

    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ò

    ShivaRaguAuthor
    Visitor II
    May 17, 2021

    Hi any update on this.

    ST Employee
    May 18, 2021

    Hi shankari @ShivaRagu​ ,

    when you build your project like that it is normal that you can't connect to bluetooth, because you did not initialized it.

    if you want, you can try to add the bluenrg-2 drivers in cubeMX (similar to what you did with cubeMX.AI) and do it from scratch.

    this way you should probably need to look into ST youtube channel for tutorials that can help you in your tasks.

    you can also add drivers and folloe the initialization of the FP-AI-SENSING1example, but it is not so easy.

    the other option you are following can be the easier one, depending on your coding knowledge.

    using FP-AI-SENSING1 as the base for your code, you should be able to understand where the sound signal path flows and where you should pick it up to feed it to your network.

    this is a hard task, but I know you can do it.

    Niccolò

    ShivaRaguAuthor
    Visitor II
    May 18, 2021

    Thanks Niccolo. Did you check the code file which I have shared? Why there is difference in the code for the same model? I understand the C-code generated in the function pack was used by TFlite model. Even I have used the same model from FP-AI-SENSING1 Pack and generated the code I can see the difference in the code.

    Am trying to generate the C-code for ASC Tflite model and trying to replace only the .h file and .c file into the function pack and was testing whether I can flash the same into the Sensor Tile Box. But after replacing the files into function pack am getting the error(attached file) IN Stm32Cube IDE.

    Hope you can understand my problem.

    Also, If I can do from scratch for Microphone I don't see any option to select the sensors in Mem1 components in MX where as its only available for other sensors like accelerometer, gyrometer, etc... What Could I do the Audio Scene? which sensor I will select in MX?

    Regards,

    shankari.

    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ò