cancel
Showing results for 
Search instead for 
Did you mean: 

how to reset lis2dh?

Zwf.1
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

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.1
Associate II

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