cancel
Showing results for 
Search instead for 
Did you mean: 

Using MEMS Studio with devices that have no MLC core, specifically LIS2DH12

elange
Associate II

I am working on a motion sensing device currently in production using a LIS2DH12 accelerometer and want to apply machine learning to the product. This is an older part with no machine learning core (MLC) onboard so can only provide motion data to the host processor (nrf52840) where a model might reside for inferencing motion classes.

I am new to MEMS Studio so still learning about its capabilities but have looked at Edge Impulse to create models for execution on host and looks very usable. I use IAR for the IDE and it can generate linkable models within IAR projects - very convenient.

My question is can I use MEMS Studio to create a model and run on the host instead of the sensor itself?

- Edwin

3 REPLIES 3
Federica Bossi
ST Employee

Hi @elange ,

 

While the MLC tool in MEMS Studio is intended for computing features 1:1 to the MLC hardware (and train decision trees to be later embedded inside the sensor to be run by the MLC engine), can indeed be used for computing features and train decision trees to be used elsewhere, like a proper MCU.

However, the main limitation of this approach is that MEMS Studio does not allow for code generation, meaning, you still need to manually implement all the code for computing the features (e.g., MEAN, VARIANCE, etc.) on windows of accelerometer data and run the decision tree (which MEMS Studio exports in the Weka textual format). In addition, since MLC engine computes features in HW using a half-floating point unit representation, your custom features won't match exactly the calculations of the MLC even if you use the correct formulas documented in the application note.

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.
elange
Associate II

Thanks Federica for your answer, I figured it would not be that easy given the focus on utilizing the MLC cores. I think at least the DataLogging feature of MEMS Studio will still be quite useful for collecting motion data and export to .csv files.

I have an MKI109V3 compatible with LIS2DH12 (DIL24) and trying to use with MEMS Studio although I have had some difficulty updating the MKI109V3 firmware for compatibility with studio. I also have a Nucleo-F401RE but don't see any support for the older accelerometer so hoping I can DataLog with the older combination with MEMS Studio.

I'm getting the Windows 11 Device Manager error not recognizing 'STM BOOTLOADER' when attempting to DFU upgrade the firmware on the MKI109V3 - I think others on the forum have encountered this too. I am virtualizing my Win11 on a Mac host so wonder if this is impacting failure to install the Device Drivers during STM32CubeProgrammer installation (see attached screenshots).

Unfortunately the MKI109V3 board does not have an STLink integrated so cannot program directly. I have a Segger J-Link but only the 10pin connector (might need adapter).

Any advice on how to best program the MKI109V3 board?

-Edwin

After more testing I believe the DFU driver problem is due to my virtualization of Win11 on a Mac host. The Mac is ARM64 based and don't think the driver was compiled for it. I was able to program the MKI109V3 through a colleague's x64 PC and worked just fine.

After upgrading the firmware I was disappointed to discover that MEMS Studio is compatible with MKI109V3 but does not allow selection of the older LIS2DH12 accelerometer (I guess this is due to lack of I3C).

So it looks like the only way to DataLog this older accelerometer is using the older Unico GUI software and also earlier compatible firmware.