Hey, I have an nrf52840, with lis2dh sensor.
I configured the sensor using the devicetree using the following code
&i2c0 {
status = "okay";
lis2dh12: lis2dh12@18 {
compatible = "st,lis2dh12";
reg = <0x18>;
int1-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; /* P0.11 connected to INT1 */
};
};
and I change the sensetivity and some other register in the runtime, and the microcontroller goes to deep sleep every while, wakes up, and start from the main.
The question is: Does the sensor got reconfigured every time it wakes up ?. Do I have to reconfigure the sensor on every wake up ?.
And most importantly, If an interrupt happened and waked up the microcontroller, and the sensor library reads the register that indicates that there is an interrupt. will that interrupt goes away ?
If yes, is there a way to prevent the devicetree initialization and still use the library ?.
It shows those lines on every wake up
00> [00:00:00.007,202] <inf> lis2dh: lis2dh12@19: int2 on [email protected] 00> [00:00:00.008,819] <inf> lis2dh: fs=2, odr=0x4 lp_en=0x0 scale=9576
Thanks in advanced