The interrupt on LIS2MDL doesn't trigger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-10 2:13 AM
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.
Solved! Go to Solution.
- Labels:
-
Environmental Sensors
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-11 4:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-10 8:16 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-11 4:58 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-11 7:08 AM
Hi Cassandre @CSo.1 ,
glad to see you solved your issue!
Thanks for sharing your solution.
-Eleon
