Skip to main content
Visitor II
February 11, 2021
Question

Hi, I am using the LSM6DSOX mems and the ST Unico software to build machine learning models to be run on its MLC. Once, I generate the .ucf file is there a way to decode/backtrack it to the configurations that were set to create it?

  • February 11, 2021
  • 3 replies
  • 1007 views

Once I have a .ucf file for the model, I just want to know if we can backtrack to the configs used. This would help in version control and maintenance of the MLC code.

    This topic has been closed for replies.

    3 replies

    ST Employee
    February 12, 2021

    Hi @HErla.1​ ,

    if I well understand your question, you can retrieve the configuration by uploading the .ucf file in the section Load/Save, as described in the MLC application note AN5259, p. 31.

    Once the MLC configuration has been completed, Unico allows loading the .ucf file generated to directly program the device. The loading feature is available in the "Load/Save" tab of the Unico main window. Alternatively, at the end of the MLC configuration a check box allows directly loading the configuration created on the device.

    When the device is programmed, the Machine Learning Core results can be monitored in the Data window of Unico or in one of the registers tabs containing the Machine Learning Core source registers.

    Moreover:

    From the .ucf file it is also possible to convert the sequence of values to a header file (.h) to be imported in any C project (e.g. driver, firmware, etc.): Unico allows .h file generation (from .ucf files) through the "C code generation" dedicated tool in the "Options" tab of the Unico main window.

    In case this answer can help you, please mark it as "best".

    -Eleon

    HErla.1Author
    Visitor II
    February 15, 2021

    Hi Eleon,

    Thank you for the detailed answer. Yes, I did go through the application note. I am aware of these facilities on Unico, and how to generate the C files and configure it in our device.

    To be more specific, once I generate the .Ucf for a ML model or configuration I have to manually save screenshots or information about them to keep track. So, my question is more around if there is a way to decode or know from .Ucf code to know the exact configurations and settings of the sensor and the model used in that release?

    Thanks in advance.

    ST Employee
    February 16, 2021

    Hi @HErla.1​ ,

    if your purpose is converting the .ucf file into -for example- a .h file, I suggest you to check the Machine Learning core C examples on Github for the LSM6DSOX.

    Here you can find several application and configuration examples, and in particular in the folder STMems_Machine_Learning_Core/application_examples/lsm6dsox/ you can find the .ucf file and the corresponding .h file (just use a parser code for the conversion from one format to the other).

    Let me know if this is close to your issue.

    -Eleon