Problem with the iis328dq's data ready interrupt
I'm trying to read the data from the iis328dq using the data ready function.
To do so, I wrote the CTRL_REG1 with 27h and CTRL_REG3 with 82h to have the accelerometer working in normal mode with 50 Hz of ODR. I use SPI at 25 Mbit/s to comunicate with the device.
I encountered 2 problems:
1)Initially no interrupts were generated from the accelerometer. Inserting a dummy read of the out registers after the power on of the accelerometer, I saw that the first interrupt was generated. Basically now reading every set of data multiple times the interrupts are generated until the accelerometer is powered down. Any idea why I see this behaviour?
2)Watching the interrupt line with an oscilloscope, I see that these interrupts are not generated at the ODR I set, but they are randomly generated.
