cancel
Showing results for 
Search instead for 
Did you mean: 

MLC embedded on LSM6DSOX gets stuck and only works on power on reset, with software reset it remained in same stuck case.

GSing.9
Associate II

MLC was working and suddenly stopped working , checked all the registers related to MLC and all the writes and read were happening properly.

Even tested accelerometer data in the same state and it was also working fine.

My device gets powered on using coin cell battery and after draining out the power , MLC started working (power dissipation in this scenario was much high than the normal scenario)

27 REPLIES 27

Hi @niccolo.ruffini​ 

I tried to write BOOT bit also, first time it worked and after multiple writes MLC stopped working and giving out results.

One more query, I am checking the MLC enable register after writing the data from h file generated from UCF file, and it says the MLC is disabled after the write.

I had to add MLC enable write in LSM6DSOX_EMB_FUNC_EN_B register once more.​

Now I am not really sure when the MLC is working and in what scenarios its not.

Because there`s no reliable behavior of the MLC.

Its really hard to fix on the scenarios.

Would really need help in making the MLC work reliably.

what are the writes you are referring to, that make the MLC stop working?

regarding the EMB_FUNC_EN_B register, please, make sure that you have selected the right page setting the FUNC_CFG_ACCESS right?

it happens that registers are read incorrectly because the page is different =)

Niccolò

Yeah I am selecting the right page settings in the FUNC_CFG_ACCESS.

If you want I can show you the complete configuration code of the MLC.

You can point out the mistake if I am making any.

Reliability is a major issue right now.

It would be more helpful to understand what is the issue that gets the MLC stuck.

that would be the turning point to find the solution, so try to get in a situation wher the MLLC works and you are able to read both mlc output and sensor data.

then, some ideas on what to investigate:

1) check whether it is a timed issue (always stops after the same amount of time), or not.

2) check whether there is a fixed number of read before the mlc gets stuck.

3) do you perform any read/write operation? if so, check the state of the MLC before and after each one of these to be sure it does not turn off for whatever reason

4) are you using a MLC network downloadable from ST.com? (a custom network can be problematic if it has some issues itself)

5) if you can work in debug mode try to use a breakpoint when the MLC is stuck to understand if the issue is at the lsm6dsox_all_sources_get or at the lsm6dsox_mlc_out_get, or maybe in some other line

sorry for the multiple questions, but this behavior is very strange

Niccolò

So to clearly state that MLC is stuck, I meant was MLC doesn`t give response when the device is kept in same situation where it worked and gave reliable state.

You can take a look into the configuration registers.

thank you, so the MLC does not respond as before, now I understand what it meant.

the only thing that can pose a problem in your code seems to be the RTOS implementation, that usually can stop or trigger some events that are in conflict with the normal operations.

anyway, if the mlc begins working, and then stops, you should try to understand the reason why it happens.

you can refer to the questions in my previous answer to follow the main steps to understand where the problem resides.

Niccolò

Ok @niccolo.ruffini​ 

The code sequence looked ok to you which I shared?

I`ll try to debug more on this.

in the sequence there are some lines that I don't fully understand, like the fact that you activate the pedometer and the wake up interrupt, but I think you turn them on for some reasons regarding your goal.

otherwise it seems fine enough to not cause the problem you see.

Let me know if you find something =)

Niccolò

Hi @niccolo.ruffini​ 

One more issue that I wanted to report regarding the MLC functionality.

The power consumption gets stuck around 300uA when MLC is enabled and doesn't goes back to original power even if you disable the MLC functionality.