2025-01-22 03:44 AM
Hello everyone,
I'm using the II2SDH accelerometer and want to collect the data whenever the Data Ready Interrupt is fired. I'm using the INT1 pin for that and this is my configuration:
SPI_WriteByte(CTRL_REG1, 0x9f); // Low power mode, 5.376Hz data rate, XYZ Axis enable
SPI_WriteByte(CTRL_REG2, 0x00);
SPI_WriteByte(CTRL_REG3, 0x10); // INT1 on data ready
SPI_WriteByte(CTRL_REG4, 0x00);
SPI_WriteByte(CTRL_REG5, 0x00);
SPI_WriteByte(CTRL_REG6, 0x00);
The INT1 pin is configured as external interrupt mode on STM32, but the interrupt won't triggered. Is there any other ways to collect the data correctly? Otherwise my FFT calculation is incorrect.
Any ideas how to fix the problem will be appreciated. Thanks.