cancel
Showing results for 
Search instead for 
Did you mean: 

How to Reset LIS3DH registers to Power ON defaults through Software method?

Pawan Das
Associate II

I am using LIS3DH accelerometer. I would like to reset all register contents to power ON defaults through software method. I know that giving a power cycle would reset the contents of the registers to defaults, but I am looking for a SW method(like writing a bit in the register).

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi Tpawan Das @Pawan Das​ ,

the BOOT bit usage is slightly different and refers to the restore of the factory calibration values inside reserved registers (00h - 06h, 0Eh, 10 - 1D), tha could be accidentally overwritten during the device operation.

More specifically (see lis2dw12 datasheet, p.18):

The trim values are stored inside the device in nonvolatile memory. Any time the device is turned on, the trimming parameters are downloaded into the registers to be used during active operation. This allows using the device without further calibration. If an accidental write occurs in the registers where trimming parameters are stored, the BOOT bit in CTRL2 (21h) can help to retrieve the correct trimming parameters from nonvolatile memory without the need to switch on/off the device. This bit is automatically reset at the end of the download operation. Setting this bit has no impact on the control registers.

Best regards,

-Eleon

View solution in original post

4 REPLIES 4
Eleon BORLINI
ST Employee

Hi @Pawan Das​ ,

Can you please check this similar question, if they are related?

There is actually no "soft reset" bit for the LIS3DH (like for example the SOFT_ RESET bit of the LIS2DW12), so the solution could be to store the default register values (usually 00h) and rewrite them every time you want to reset the device.

I know it's not a so smart solution, but for the LIS3DH I think this is the only solution together with the power cycle.

-Eleon

Thanks Eleon for the confirmation about the Reset bit. The question you linked, looks to be similar. Could you please let us know if CTRL_REG5 Bit 7 called BOOT can be used in any manner to reset all registers of the IC?

Eleon BORLINI
ST Employee

Hi Tpawan Das @Pawan Das​ ,

the BOOT bit usage is slightly different and refers to the restore of the factory calibration values inside reserved registers (00h - 06h, 0Eh, 10 - 1D), tha could be accidentally overwritten during the device operation.

More specifically (see lis2dw12 datasheet, p.18):

The trim values are stored inside the device in nonvolatile memory. Any time the device is turned on, the trimming parameters are downloaded into the registers to be used during active operation. This allows using the device without further calibration. If an accidental write occurs in the registers where trimming parameters are stored, the BOOT bit in CTRL2 (21h) can help to retrieve the correct trimming parameters from nonvolatile memory without the need to switch on/off the device. This bit is automatically reset at the end of the download operation. Setting this bit has no impact on the control registers.

Best regards,

-Eleon

Pawan Das
Associate II

Thanks @Eleon BORLINI​ for the answer.