Skip to main content
Visitor II
April 30, 2020
Solved

how to reset lis2dh?

  • April 30, 2020
  • 2 replies
  • 1318 views

hi st:

I am using lis2dh, driven by spi. Initially set to fifo mode, 25hz. When the power is turned on for the first time, I can read that there is data in the fifo, and the data are normal. When I reset the mcu and initialize the sensor again, the data cannot be read later. I have to power on lis2dh before it can work properly. So how to reset lis2dh, I have tried to set it to power dowm mode and then set it to normal mode, and it still behaves like this.

ps (vddio and vdd connect to vdd)

thanks!

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @Zwf.1​ , after you reset the MCU and re-initialize the sensor did you tried to read the WHO_AM_I (0Fh) register, to check if the issue is on the data output stage , on the FIFO art or on the sensor as a whole? If the issue is with the FIFO, I suggest you to switch to Bypass mode before shutting down the device, to reset the FIFO. If you are working in normal mode, the datasheet reports also this recommendation, in p. 37:

    By design, when the device from high-resolution configuration (HR) is set to power-down mode (PD), it is recommended to read register REFERENCE (26h) for a complete reset of the filtering block before switching to normal/high-performance mode again for proper device functionality.

    Regards

    2 replies

    ST Employee
    April 30, 2020

    Hi @Zwf.1​ , after you reset the MCU and re-initialize the sensor did you tried to read the WHO_AM_I (0Fh) register, to check if the issue is on the data output stage , on the FIFO art or on the sensor as a whole? If the issue is with the FIFO, I suggest you to switch to Bypass mode before shutting down the device, to reset the FIFO. If you are working in normal mode, the datasheet reports also this recommendation, in p. 37:

    By design, when the device from high-resolution configuration (HR) is set to power-down mode (PD), it is recommended to read register REFERENCE (26h) for a complete reset of the filtering block before switching to normal/high-performance mode again for proper device functionality.

    Regards

    Zwf.1Author
    Visitor II
    May 6, 2020

    I reset the fifo, and now it can work. thanks