cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH12 reset (BOOT in CTRL_REG5)

szgabor.flowide
Associate

Hallo,

I am wondering how can I reset the LIS2DH12 accelerometer. I am using the official ST driver which preserves register contents on nearly all actions (read-modify-write), and the MCU in hardware may perform a soft reset when it tries to re-initialize the LIS, so it will be good to make some "reset"...

I supposed that the BOOT field in CRTL_REG5 is initiates a kind of soft reset. I write it to '1' in the beginning of initialization, but the results are not what I expect. (I didn't check all registers but it is sure that it does not reset all in my case.)

What does this BOOT field exactly do? Should I reset all registers manually instead?

Thank you in advance.

Gábor

1 REPLY 1
TBomb.1
Senior II

Hi Gabor, yes, the boot should be a kind of soft reset. Suppose you configure the device in some ways, then when you write the BOOT bit, you wait at least 5ms and then if you read the previously configured register you should see them at 00h.

An alternative way to reset the configuration registers is to power off the device and then rewrite the registers, or manually write their values at 00h.

Tom