Skip to main content
Visitor II
May 26, 2021
Question

lsm6dsox interrupt

  • May 26, 2021
  • 1 reply
  • 850 views

Hi,

I want to read sensor data periodically in interrupt mode.

And sensor is configured like below code.

 /* Set Output Data Rate */
 lsm6dsox_xl_data_rate_set(&lsm_ctx, LSM6DSOX_GY_ODR_3333Hz);
 lsm6dsox_gy_data_rate_set(&lsm_ctx, LSM6DSOX_GY_ODR_3333Hz);
 
/* Enable interrupt generation on Inactivity INT1 pin */
 lsm6dsox_pin_int1_route_get(&lsm_ctx, &int1_route);
 int1_route.drdy_xl = PROPERTY_ENABLE;
 lsm6dsox_pin_int1_route_set(&lsm_ctx, int1_route);
 

But int1 pin is measured as 1kHz or 1.6kHz

0693W00000APnfXQAT.png0693W00000APnfSQAT.pngHow could Int1 Pin change Low to High every 3333Hz?

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 27, 2021

    Hi @Community member​ ,

    it seems that the interrupt is not configured right.

    can you check the status of bit INT1_DRDY_XL in register INT1_CTRL (0Dh)?

    also, is your interrupt latched or not?

    (check bit LIR in register TAP_CFG0 (56h))

    Niccolò