Skip to main content
DDuc .1
Associate
May 5, 2021
Solved

Free fall detection in LSM6DSO not working.

Hello everyone!

I got LSM6DSO on my custom board with stm32l4 MCU, I only use I2C interface (that i don't use interrupt). I'm using LSM6DSO free fall example code in STMems standard C drivers, I can get the id of LSM6DSO so i think the I2C interface is working fine, I have tried doing some free fall test (drop it from my hand) but the FF_IA in WAKE_UP_SRC kept staying 0) so the free fall can't be detected.

Can anyone help me?

This topic has been closed for replies.
niccolò
niccolòBest answer
ST Employee
May 6, 2021

Hi @DDuc .1​ ,

did you configure the wake-up interrupt?

I ask this, because the register you are reading is for the wake-up

you should check the FF_IA bit in register ALL_INT_SRC (1Ah)

also can you confirm that you set the INTERRUPTS_ ENABLE bit in register TAP_CFG2 (58h)?

even if you do not route the interrupts on INT1 or INT2, you have to set it to let the free-fall trigger

I hope this helps

Niccolò

9 replies

niccolò
niccolòBest answer
ST Employee
May 6, 2021

Hi @DDuc .1​ ,

did you configure the wake-up interrupt?

I ask this, because the register you are reading is for the wake-up

you should check the FF_IA bit in register ALL_INT_SRC (1Ah)

also can you confirm that you set the INTERRUPTS_ ENABLE bit in register TAP_CFG2 (58h)?

even if you do not route the interrupts on INT1 or INT2, you have to set it to let the free-fall trigger

I hope this helps

Niccolò

DDuc .1
DDuc .1Author
Associate
May 7, 2021

Hi @niccolo.ruffini​ 

Your configuring the wake-up interrupt suggestion really help me a lot, I have configured wake-up interrupt and it worked! The FF_IO in WAKE_UP_SRC turn to 1 as my expectation.

Beside, I have checked the FF_IO from ALL_INT_SRC instead of WAKE_UP_SRC bit it didn't go to 1 when I tested free-fall (even I routed the interrupt). Do you know why ?

Thanks for your big help!

niccolò
ST Employee
May 7, 2021

Hi @DDuc .1​ ,

you are welcome, I'm glad to hear it worked =)

regarding the ALL_INT_SRC it can depend on how you configured other registers.

depending on your configuration I figured one of the two suggestion was right.

if you want we can dig deep into it.

Niccolò

p.s. if the problem is solved, you can select a best answer to help other members of the community with similar problems