Problem with Freefall Detection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with Freefall Detection

680 Views
joãopaulo
Contributor III

I am not able to use the FXOS8700CQ accelerometer present on the kv31f board.
I would like to use the freefall function and for this I configured the following registers.

Freefall ConfigurationZ < 0,3g using MFF Function 4g, 100 Hz ODR, Normal Mode
Register NameRegister AddrData (R/W)Description
CTRL_REG10x2A0x00 WStandby mode for writable operations
WHO_AM_I0x0DReadCheck device communication (0xC7)
XYZ_DATA_CFG0x0E0x01 WHight-pass filter disabled, +/-0.488mg/LSB
CTRL_REG10x2A0x18 WSet the device in 100 Hz ODR, Standby
A_FFMT_CFG0x150xA0 WLatch enable, Freefall, Z axis
A_FFMT_THS0x170x05 W0,3g threshold
A_FFMT_COUNT0x180x0A WDebounce 100ms
CTRL_REG40x2D0x04 WFF interrupt enable
CTRL_REG50x2E0x04 Winterrupt routed to INT1 pin
CTRL_REG10x2A0x19 WSet the device in 100 Hz ODR, Active Mode

- The communication is working properly because I can read the WHO_AM_I register,

- I've already followed the AN4070 document,

But it's not working, the Freefall interrupt isn't happening,

I've tried to use the 3 axes and then only one but none worked.

Is there any other register that I need to configure?

What else should I do?

 

Thanks 

Labels (1)
0 Kudos
Reply
1 Reply

491 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Joao,

You should also configure both the ipol and pp_od bits of the CTRL_REG3 register. Also make sure the corresponding GPIO pin on your MCU is configured as interrupt input with proper polarity.

Then I would recommend using a logic analyzer or an oscilloscope to know what is going on the bus and INT pin. If you are able to detect only first interrupt, then please double check if you read properly the A_FFMT_SRC register to clear the src_ffmt flag and consequently deassert the INT pin. It is also necessary to acknowledge an IRQ in your ISR usually by writing a logic 1 to a specific bit of your MCU. Without doing it, the interrupt flag on your MCU will remain active and then you will not be able to receive any further interrupts from the FXOS8700CQ.

I hope it helps.

Best regards,

Tomas

0 Kudos
Reply