2023-05-05 03:12 AM
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)
2023-05-05 07:27 AM
Hi @Community member ,
Welcome ST Community!
How are you implementing the SW Reset?
2023-05-06 04:36 AM
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.
2023-05-08 12:54 AM
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.
2023-05-08 01:52 AM
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ò
2023-05-08 03:46 AM
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)
2023-05-08 04:18 AM
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.
2023-05-08 04:21 AM
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]); }
2023-05-08 04:43 AM
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ò
2023-05-08 04:46 AM
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?