2024-04-29 01:57 AM
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.
2024-04-29 03:40 AM
WAKE_UP_THS, How to do this calculation?
2024-04-30 02:25 AM
@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?
2024-04-30 02:49 AM
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.
2024-05-03 10:28 PM
@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
2024-05-20 03:48 AM
@Federica Bossi waiting for your reply!!
2024-05-30 05:19 AM
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.