AnsweredAssumed Answered

LIS3DH Interrupt INT1 Mode Not Firing

Question asked by Wedekind.Jeffrey on Apr 7, 2017

I'm using the LIS3DH set at 1 Hz ODR.  My SPI hardware seems to be working since DATA_RDY interrupts come in fine at a steady 1 second interval and the accelerometer data looks good.  In fact I get good data at all speeds.  However I can't seem to get the threshold interrupts working.  I read the app notes, found setups on the web, and tried a lot of different configurations.  Below is a sample setup.

 

Could you send me a register sequence that you know works to trigger an INT1 interrupt?

 

Also the ADC seems to give me 2032 to -2032 for a range of .9 to 1.8 volts maybe this is a clue.  The temperature gives me -16 so I haven't been able to get this working either.  Self test seems ok.

 

Thanks

 

Jeffrey Wedekind 

 

#define LIS3DH_CONFIG_CTRL_REG1 0x17 // 1 Hz, Zen, Yen, Xen
#define LIS3DH_CONFIG_CTRL_REG2 0x00 // Default Settings
#define LIS3DH_CONFIG_CTRL_REG3 0x40 //
#define LIS3DH_CONFIG_CTRL_REG4 0x80 //
#define LIS3DH_CONFIG_CTRL_REG5 0x00 //
#define LIS3DH_CONFIG_CTRL_REG6 0x00 //

#define LIS3DH_CONFIG_REFERENCE 0x00 //

#define LIS3DH_CONFIG_INT1_CFG 0x95 //
#define LIS3DH_CONFIG_INT1_THS 0x01 //
#define LIS3DH_CONFIG_INT1_DURATION 0x01 //

nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG1_rw, LIS3DH_CONFIG_CTRL_REG1);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG2_rw, LIS3DH_CONFIG_CTRL_REG2);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG3_rw, LIS3DH_CONFIG_CTRL_REG3);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG4_rw, LIS3DH_CONFIG_CTRL_REG4);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG5_rw, LIS3DH_CONFIG_CTRL_REG5);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_CTRL_REG6_rw, LIS3DH_CONFIG_CTRL_REG6);

nrf51_tag_spi0_lis3dh_set_register(LIS3DH_INT1_THS_rw, LIS3DH_CONFIG_INT1_THS);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_INT1_DURATION_rw, LIS3DH_CONFIG_INT1_DURATION);
nrf51_tag_spi0_lis3dh_set_register(LIS3DH_INT1_CFG_rw, LIS3DH_CONFIG_INT1_CFG);

Outcomes