Skip to main content
Visitor II
April 29, 2024
Question

LSM6DSLTR interrupt configuration

  • April 29, 2024
  • 4 replies
  • 1695 views

Hi, 

I am trying to configure interrupt on LSM6DSLTR module but I am not able to get any interrupt on the pin INT1.

I am using nrf52 dk for setting interrupt on pin.

 

err_code = nrf_drv_mpu_write_single_register(LSM6DSL_ACC_GYRO_INT1_CTRL, 0x03);
if(err_code != NRF_SUCCESS) return err_code;

err_code = nrf_drv_mpu_write_single_register(LSM6DSL_ACC_GYRO_TAP_CFG1, 0x90);
if(err_code != NRF_SUCCESS) return err_code;

err_code = nrf_drv_mpu_write_single_register(LSM6DSL_ACC_GYRO_WAKE_UP_DUR, 0x00);
if(err_code != NRF_SUCCESS) return err_code;

err_code = nrf_drv_mpu_write_single_register(LSM6DSL_ACC_GYRO_WAKE_UP_THS, 0x02);
if(err_code != NRF_SUCCESS) return err_code;

err_code = nrf_drv_mpu_write_single_register(LSM6DSL_ACC_GYRO_MD1_CFG, 0x20);
if(err_code != NRF_SUCCESS) return err_code;

After configuring interrupt my values becomes repeated or same

<info> app: 251781.25, 231621.25, 231621.25, 1755.82, 1755.82, 1755.82
<info> app: 33643.75, 13483.75, 13483.75, 235.09, 235.09, 235.09

Can you please guide me, if what I am doing is right or not ? If its not right please let me know how can i configure the interrupt properly.

 

 

    This topic has been closed for replies.

    4 replies

    yash2530Author
    Visitor II
    April 29, 2024

    WAKE_UP_THS, How to do this calculation?

    yash2530Author
    Visitor II
    April 30, 2024

    @Federica Bossi, If you could help me. I have got interrupt on the INT1 pin but it is consuming power. How can i reduce the power consumption. from mA to uA. What settings should I apply?

     

    Technical Moderator
    April 30, 2024

    Hi @yash2530 ,

    You can try implementing our PID example on github. It is developed in the best condition to have the lowest consumption.
    Above all, I advise you not to turn on the gyroscope if you want to reduce power consumption since you don't need it for wake up.

    yash2530Author
    Visitor II
    May 4, 2024

    @Federica Bossi Can you also guide on how I can generate an interrupt based on angle of rotation?  Is it possible?

    I have a use case what I want to detect if the mem sensor is rotated suppose 15 degree then only it starts throwing values.

    If this is not possible, then is there any way I can achieve a motion threshold higher, And how is the wake up threshold calculated.

    Thanks

    yash2530Author
    Visitor II
    May 20, 2024

    @Federica Bossi waiting for your reply!!

    Technical Moderator
    May 30, 2024

    Hi @yash2530 ,

    We don't have any examples for this specific case but you can try different threshold values in terms of amplitude and duration and see if something changes.