cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dsox interrupt

JPARK.2
Associate II

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?

1 REPLY 1
niccolò
ST Employee

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ò