cancel
Showing results for 
Search instead for 
Did you mean: 

LIS3DH INT2_SRC is always 0 regardless of configuration. Pin does not trigger.

videojames
Associate III

Hello,

I am trying to setup INT2 pin on LIS3DH. I can successfully setup INT1 without any issues and confirm an interrupt has fired with INT1_SRC (0x31).

I am trying to setup INT2 pin the same and confirm when it fires by reading INT2_SRC (0x35) but cannot see the interrupt fire.

In my code I use a 2D array to manage the registers and their settings.

configBuf[i][] refers to the target register and configBug[][j] refers to the value I will be writing.

I have left in comments to show what else I have tried. So far no combination of this results in being able to trigger any value other than zero in INT2_SRC (0x35).

	configBuf[0][0] = 0x20; //CTRL_REG1
	//configBuf[0][1] = 0x37; //25Hz, Enable-all-axis
	configBuf[0][1] = 0x67; //200Hz, Enable-all-axis
 
	configBuf[1][0] = 0x21; //CTRL_REG2
	//configBuf[1][1] = 0x00; //No High Pass Filtering   //TODO: Test 0x02
	configBuf[1][1] = 0x0B; //INT High Pass Filtering   //TODO: high Pass Filter enabled for interrupts, pass filtered data selection
 
	configBuf[2][0] = 0x22; //CTRL_REG3
	configBuf[2][1] = 0x2C; //Enable Interrupts on INT1
	//configBuf[2][1] = 0x00; //DisableInterrupts on INT1
 
	configBuf[3][0] = 0x23; //CTRL_REG4
	configBuf[3][1] = 0x00; //+-2g resolution
 
	configBuf[4][0] = 0x24; //CTRL_REG5
	configBuf[4][1] = 0x0F; //Enable Latching for INT1 and INT2
 
	configBuf[5][0] = 0x25; //CTRL_REG6
	configBuf[5][1] = 0x00; //Enable Interrupt Function 1 and 2 and ACT on INT2
	//configBuf[5][1] = 0x40; //Enable Interrupt Function 1 on INT2
	//configBuf[5][1] = 0x20; //Enable Interrupt Function 2 on INT2
	//configBuf[5][1] = 0x60; //Enable Interrupt Function 1 and 2 on INT2
	//configBuf[5][1] = 0x1A; //Enable Interrupt Function 1 and 2 and ACT on INT2
 
	configBuf[6][0] = 0x30; //INT1_CFG
	configBuf[6][1] = 0x7F; //Enable every interrupt on INT1
	//configBuf[6][1] = 0x00; //Disable every interrupt on INT1
 
	configBuf[7][0] = 0x32; //INT1_THS
	configBuf[7][1] = 0x10; //Threshold (THS) = 16LSBs * 15.625mg/LSB = 250mg.
 
	configBuf[8][0] = 0x33; //INT1_DUR
	configBuf[8][1] = 0x00; //Duration = 1LSBs * (1/10Hz) = 0.1s.
 
	configBuf[9][0] = 0x34; //INT2_CFG
	//configBuf[9][1] = 0x7F; //Enable every possiible interrupt on INT2 / OR Configuration
	configBuf[9][1] = 0x00; //Disable INT2
 
	configBuf[10][0] = 0x35; //INT2_THS
	configBuf[10][1] = 0x10; //Threshold (THS) = 16LSBs * 15.625mg/LSB = 250mg.
 
	configBuf[11][0] = 0x36; //INT2_DUR
	configBuf[11][1] = 0x00; //Duration = 1LSBs * (1/10Hz) = 0.1s.

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @Community member​ , when you configure the Interrupt 2 setting the INT2_CFG (34h) register, can you try to disable first the Interrupt 1 settings to check if the issue is caused by a combination of the two interrupts? And did you check if the interrupt is raised on physical pin INT2, after the CTRL_REG6 (25h)? Regards

videojames
Associate III

Hi Eleon, I have tried just setting up the single interrupt pin on it's own with no success. I have not been able to detect an interrupt on the INT2 Pin. Can I confirm that there shouldn't be an issue having both interrupt pins configured?

Hi @Community member​ , no, you don't have to worry to setup the two interrupts together. When you configure the CTRL_REG6 (25h) register, can you read back the configured value to check if it has been properly written? Regards