Skip to main content
abali.1
Associate II
September 17, 2021
Question

use interrupt from ISM330DLC

How to configure ISM330DLC registers to use the INT1 for Free-fall and tilt event?

This topic has been closed for replies.

5 replies

niccolò
ST Employee
September 24, 2021

Hi @abali.1​ ,

you should

  • set to 1 the INTERRUPTS_ENABLE bit in register TAP_CFG (58h)
  • set to 1 TILT_EN and FUNC_EN bits in resister CTRL10_C (19h)
  • route the freefall and tilt interrupts to INT1 or INT2 in register MD1_CFG (5Eh) or MD2_CFG (5Fh) by setting to 1 the corresponding bits
  • check registers WAKE_UP_DUR (5Ch) and FREE_FALL (5Dh) for options

check the datasheet for further details

let me know if this helps

Niccolò

abali.1
abali.1Author
Associate II
September 24, 2021

Dear @niccolo.ruffini​ ,

Thanks a lot for the reply.

I have gone through the datasheet in the last one week and found the same configuration for the Free-fall and Tilt interrupt.

I am still struggling and unable to get the interrupts. I am able to get data-ready interrupt for accelerometer only.

Please help.

Thanks.

niccolò
ST Employee
September 27, 2021

Hi @abali.1​ ,

can you check during execution if the registers involved are at the expected value?

maybe there is some function that modifies the values

Niccolò

abali.1
abali.1Author
Associate II
September 27, 2021

Hi @niccolo.ruffini​ ,

Thanks for your comment.

The values to the registers 0x5C, 0x5D, 0x5E and 0x5F are always constant to 0x00, 0x00, 0x04 and 0xC2.

These registers are not getting affected when I try to set or clear the bits.

I tried to write and then read in a loop, but not getting the value what I tried to write.

Any suggestion?

niccolò
ST Employee
September 27, 2021

Hi @abali.1​ ,

even if the value in register 5Fh should route the interrupt to INT2, if you have problems writing the registers, maybe you should backtrack and fix that problem first.

try to check if the values written are what you expect (by debugging the code, or with an oscilloscope)

Niccolò