Hello,
I have configured my MMA8451 for motion detection with interrupt to INT1 pin.
Now my problem, the interrupt in the FF_MT_SRC register (0x16) is indicated.
But the INT_SOURCE register (0x0C) is always 0x00.
I thougth the both registers are linked together directly, is'nt it?
What can be the cause?
Here my configuration:
FF_MT_CFG = 0xD8
FF_MT_THS = 0x08
FF_MT_COUNT = 0x0A
ASLP_COUNT = 0x0A
XYZ_DATA_CFG = 0x00
CTRL_REG1 = 0xB5
CTRL_REG2 = 0x0D
CTRL_REG3 = 0x06
CTRL_REG4 = 0x04
CTRL_REG5 = 0x04
Target would be an interrupt on pin INT1 when the sensor will be moved from his rest position.
While the rest position can be any possible position. When there is no movement (in any position) the interrupt pin should go to low.
Thanks!
Regards
Christian
Hi Christian,
Could you please post here your complete source code or send me a direct message if you would like to keep it confidential?
However, I assume you read the FF_MT_SRC_register first, which clears the SRC_FF_MT flag in the INT_SOURCE register (0x0C):
Based on your description, I would rather recommend using the transient detection function which analyzes high-pass filtered data, eliminating the DC tilt offset (effect of gravity). Take a look at our AN4071 for more information.
I hope it helps.
Regards,
Tomas
PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.