2025-02-19 02:33 AM
Hi
We are currently working on a project using the nRF5340 MCU with Zephyr, and the interface between the MCU and LSM6DSOX is set up using the I2C protocol.
We are able to successfully get data related to step count, accelerometer, gyroscope data, tilt, tiltpan, single/double tap. We are trying to evaulate the Activity recognition feature.
As part of the project, we are trying to implement the MLC (Machine Learning Core) for detecting activity states such as idle, walk, or run. We came across example application on GitHub
Based on above links, we integrated the lsm6dsox_activity.c and lsm6dsox_reg.c files into our application firmware, as these files have necessary dependencies. We then call the lsm6dsox_activity() function from main.c and continuously monitor the MLC0_SRC (0x70h) register within a dedicated thread to capture the different activity states (idle, walk, run, etc.).
We are facing difficulty in integrating the MLC with our Application.
Please find the attached screenshots of the implementation, showing how the MLC function is being called, how the MLC0_SRC register is being monitored, and the integration of the files from your GitHub source.
Please let me know how to resolve the issue.
Thanks