cancel
Showing results for 
Search instead for 
Did you mean: 

The interrupt on LIS2MDL doesn't trigger.

CSo.1
Associate II

I would like to have an interrupt thank to a threshold. So I have used CFG_REG_C (0x62) to enable interrupt on pin and INT_CTRL_REG to configure it (see screenshot). However, the interrupt is never trigger, so I have readen INT_SOURCE_REG each 500 ms, and we can see that there is interrupt (last bit) and the threshold is exceeded on differents axes, but I have never had interrupt on pin.

1 ACCEPTED SOLUTION

Accepted Solutions
Hi,
I tested with the Github examples and I had the same problems, but I have found a solution. Since I use the iks01a3, the interrupt pin is the A4 on my nucleo board. I tested removing jumper 9 and 10 and showing interrupt signal with a logic analyser: it works. So I joined it to an other pin (A1) and it still works. I tested with an other iks01a3 and it is the same thing, so I think my nucleo has an hard problem on A4.
Thank you for your help,
Cassandre

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @CSo.1​ ,

Could you check your code with the one available on Github for the LIS2MDL?

I suggest you -in particular- the following ones:

  • lis2mdl_int_conf.c --> this example code shows how to set interrupt and configure interrupt threshold on magnetic field.
  • lis2mdl_read_data_int.c --> this could be useful for a check of whether the INT pin is working, enabling data-ready (DRDY) interrupt signal on the INT pin.

Please let me know the output of your tests.

-Eleon

Hi,
I tested with the Github examples and I had the same problems, but I have found a solution. Since I use the iks01a3, the interrupt pin is the A4 on my nucleo board. I tested removing jumper 9 and 10 and showing interrupt signal with a logic analyser: it works. So I joined it to an other pin (A1) and it still works. I tested with an other iks01a3 and it is the same thing, so I think my nucleo has an hard problem on A4.
Thank you for your help,
Cassandre

Hi Cassandre @CSo.1​ ,

glad to see you solved your issue!

Thanks for sharing your solution.

-Eleon