cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the MLC0_SRC Register properly on LSM6DSOX

MSchw.2
Associate II

Hello, 

I am trying to use the MLC on the LSM6DSOX with the 6D Position Recognition Sample.

The Interrupts on INT1 are triggered as expected, but when I read the MLC0_SRC (0x70U) it always returns 0. Moreover, I tried different samples - same problem.

I was able to read other registers, for example the TAP_SRC where the data is properly returned. (Double Tap/Single Tap)

So, is there a difference in reading the MLC0_SRC and TAP_SRC except the address?

Thanks in advance,

Manuel

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @MSchw.2​ , it seems the MLC is not properly working, or has been wrongly set... Did you correctly configured the Machine Learning Core registers? Did you use Unico and Weka for the decision tree and register value generation ah described in the AN5259 p.18 and sgg.? Can you share your configuration procedure? Regards

MSchw.2
Associate II

Hi @Eleon BORLINI​ . Thanks for your answer!

As is understood, in the ucf configuration (https://github.com/STMicroelectronics/STMems_Machine_Learning_Core/tree/master/lsm6dsox/6D%20position%20recognition) are already all the settings and configuration which is needed? Or are there other register which have to be configured aswell?

I am using I2C with an arduino.

First, I am writing the ucf configuration to the sensor and then I am reading the MLC0_SRC register.

Kind regards,

Manuel

MSchw.2
Associate II

Hi,

I also tried now to set the MLC parameters manually:

EMB_FUNC_EN_B  to "B00011001"

EMB_FUNC_INIT_B to "B00011001"

Interrupts are triggered properly, but still no data in MLC0_SRC, always returns 0.

MLC_STATUS_MAINPAGE return 1.

Any idea?

Kind regards,

Manuel