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
Federica Bossi
ST Employee

Hi @Community member​ ,

Welcome ST Community!

How are you implementing the SW Reset?

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.
GSing.9
Associate II

Hi @Federica Bossi​ 

I am doing SW reset on the sensor using LSM6DSOX_CTRL3_C (0x12) register and also reprogramming the device again and again.

Do tell me if I am missing something.

GSing.9
Associate II

When I am writing the values of the UCF using the generated h file, then the power consumption shoots up to ~320uA and if I don't write these values and do the power reset then the power consumption comes down to the desired offset value. FYI: MLC is enabled on the respected registers.

niccolò
ST Employee

Hi @Community member​ ,

I would like to ask you a couple questions to better understand the issue:

when you perform the software reset, do you write both BOOT and SW_RESET bits?

can you confirm that the software reset was successful? (you should not be able to read data immediately after the reset, then, when you turn back on the device you should be able to read data again)

Niccolò

GSing.9
Associate II

Hi @niccolo.ruffini​ 

When I perform software reset I only write on SW_RESET bits.

And yes after doing reset I am not able to read from my sensor.( I have used Reset after sensor config too where the sensors stopped communicating)

GSing.9
Associate II

And the MLC works in a very strange way, in same position it gives out relevant MLC state and after reprogramming it stops intermittently.

I am really not sure If I am missing out on the configuration of the registers related to MLC, because I have compared register settings with the example given on STM`s github links.

Just to add on this, I am checking the MLC output state on the accel interrupt events.

      lsm6dsox_all_sources_get(&dev_ctx, &all_source); // get lsm source data

      NRF_LOG_INFO("MLC is available :%d",all_source.mlc1);

      if (all_source.mlc1) {

       lsm6dsox_mlc_out_get(&dev_ctx, &mlc_out[0]); }

Hi @Community member​ ,

the SW_RESET bit only clears the CTRL registers, so it is normal that the MLC is not rebooted.

please, try to write also the BOOT bit if you want to clear (and then try to write back manually) MLC configuration.

Then you can turn on back again the sensor and check if it is still stuck.

Let me know if this solves the issue

Niccolò

the code seems right to me, but let me understand better the situation:

you are saying that it works until reprogramming it.

what are the steps you need to do to get the code to fail?