Skip to main content
Visitor II
April 4, 2019
Solved

LSM6DSOX And STM32cube

  • April 4, 2019
  • 3 replies
  • 1323 views

Hi,

I am using LSM6DSOX and ProfiMEMS​ board . I have created my modelm based on WEKA(decision tree) and I tested it in Unico v.8 and it worked.

Now the question is how can I use my final model(the model which I loaded in MLC)​ in STM32cube? How is the procedure? Thank you in advance for helping.

regards​

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi spark, after getting the .ucf file (unico configuration file), you can download the .txt file clicking on the "Save" button, and it will download the configuration registers. Once you have it, you will know the values you have to write (in SPI or I2C) inside the LSM6DSOX registers to setup your decision tree. You will know the output of the MLC by checking the MLC0_SRC (70h)....MLC7_SRC (77h) for the decision tree results and the MLC_STATUS_MAINPAGE (38h), MLC_STATUS (15h), MLC_INT1 (0Dh) for the decision tree interrupts (see link p.10). Regards

    3 replies

    ST Employee
    April 4, 2019

    Hi, I suggest you this procedure: when the register configuration for the device has been saved, it can be loaded in the device using the Load/ Save tab of the Unico GUI.

    0690X0000089vbiQAA.png

    You can save the configuration file, to have the dump of the memory regs. These values can be inserted in an example file of X-CUBE-MEMS1 the LSM6DSO acquisition (same as LSM6DSOX as regard the data acquisition)

    Regards

    sparkAuthor
    Visitor II
    April 5, 2019

     Thank you so much for answering.

    I have done the steps and loaded the configuration file and saw the performance of my algorithm.

    The second question is that my configuration file format is 'ucf ' and as you said I can insert this file in one this example file.

    Could you please let me know how to do that.

    As I told you before My board is STEVAL-MKI109V3 (ProfiMEMS) and I as you informed me I downloaded X-CUBE-MEMS1 . Is this the right path about the examples you mean:

    project/STM32F401RE-Nucleo/Examples/IKS01A3

    Thank you in advance

    ST Employee
    April 11, 2019

    Hi spark, after getting the .ucf file (unico configuration file), you can download the .txt file clicking on the "Save" button, and it will download the configuration registers. Once you have it, you will know the values you have to write (in SPI or I2C) inside the LSM6DSOX registers to setup your decision tree. You will know the output of the MLC by checking the MLC0_SRC (70h)....MLC7_SRC (77h) for the decision tree results and the MLC_STATUS_MAINPAGE (38h), MLC_STATUS (15h), MLC_INT1 (0Dh) for the decision tree interrupts (see link p.10). Regards