Skip to main content
CSo.1
Associate II
May 10, 2021
Solved

The interrupt on LIS2MDL doesn't trigger.

  • May 10, 2021
  • 3 replies
  • 1351 views

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.

This topic has been closed for replies.
Best answer by CSo.1
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

3 replies

Eleon BORLINI
ST Employee
May 10, 2021

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

CSo.1
CSo.1AuthorBest answer
Associate II
May 11, 2021
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
Eleon BORLINI
ST Employee
May 11, 2021

Hi Cassandre @CSo.1​ ,

glad to see you solved your issue!

Thanks for sharing your solution.

-Eleon