2019-03-05 09:11 PM
Here is my test code, that I single-step to observe the reg_status first, then write what I think should start the device, but I see nothing on INT1. Each reg_status read show the correct data (same as what I am writing):
reg_status = ReadReg(LSM6DSM_CTRL2_G);
WriteReg(LSM6DSM_CTRL2_G, 0x70); // set ODR = 833 Hz, set Scale = 250 dps
reg_status = ReadReg(LSM6DSM_DRDY_PULSE_CFG);
WriteReg(LSM6DSM_DRDY_PULSE_CFG, 0x80); // use pulses for INT1
reg_status = ReadReg(LSM6DSM_CTRL7_G);
WriteReg(LSM6DSM_CTRL7_G, 0x40); // enable Gyro high performance
reg_status = ReadReg(LSM6DSM_INT1_CTRL);
WriteReg(LSM6DSM_INT1_CTRL, 0x02); // enable Data Ready on INT1
reg_status = ReadReg(LSM6DSM_CTRL3_C);
WriteReg(LSM6DSM_CTRL3_C, 0x04); // active-H, Auto Increment for multi-byte operations
reg_status = ReadReg(LSM6DSM_CTRL4_C);
WriteReg(LSM6DSM_CTRL4_C, 0x30); // enable Data Ready on INT1
reg_status = ReadReg(LSM6DSM_MASTER_CONFIG);
WriteReg(LSM6DSM_MASTER_CONFIG, 0x80); // enable Data Ready on INT1