2022-01-18 05:24 AM
2022-01-28 06:43 AM
Hi @RHold.2 ,
can you please check better the datasheet? The LIS2DW12 has no CTRL0 register, and the CTRL1 default should be 0x00. 0x04 is the default value of reg CTRL2.
Can you please check if you might have shifted the reading of the registers in your code, for some reason?
-Eleon
2022-01-28 06:55 AM
Please accept my apologies, I checked the datasheet, but wrongly indexed CTRL-register names only in my post, not in my code, so correcting the post:
I use LIS2DW12 MEMS, via SPI. I can correctly read reg. 0x0F, I obtain 0x44. I can also write to regs CTRL3-CTRL7; the written vals can be read back afterwards. But I fail to write CTRL1/2, which always read back as default: 0x00/0x04. How to write CTRL1/2?
Thank you,
Richard
2022-01-28 07:22 AM
Hi Richiard @RHold.2 ,
There should be no reason you cannot write (but you can read) these specific two registers.
Did you configured correctly the SPI communication in writing mode (datasheet p.31)?
To investigate if the issue is related to the code, did you comment the line of the codes of CTRL1/2 registers, are you face issues with CTRL 3/4?
-Eleon