Skip to main content
Visitor II
May 5, 2023
Question

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

  • May 5, 2023
  • 7 replies
  • 4898 views

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)

    This topic has been closed for replies.

    7 replies

    Technical Moderator
    May 5, 2023

    Hi @Community member​ ,

    Welcome ST Community!

    How are you implementing the SW Reset?

    GSing.9Author
    Visitor II
    May 6, 2023

    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.9Author
    Visitor II
    May 8, 2023

    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.

    ST Employee
    May 8, 2023

    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.9Author
    Visitor II
    May 8, 2023

    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)

    ST Employee
    May 8, 2023

    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ò

    GSing.9Author
    Visitor II
    May 8, 2023

    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.​

    GSing.9Author
    Visitor II
    May 8, 2023

    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.

    GSing.9Author
    Visitor II
    May 8, 2023

    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]); }

    ST Employee
    May 8, 2023

    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?

    Visitor II
    January 31, 2025

    I'm having the same issue where MLC is stuck and won't work after flashing ucf file. Did you manage to find a solution?