MMA8652, problem with freefall/motion flag reading. Desperately need help!

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

MMA8652, problem with freefall/motion flag reading. Desperately need help!

1,661 Views
samkuliev
Contributor I

Hello,
I am using MMA8652FC accelerometer in on of my developments and desperately need help to solve the following problem as I am way behind schedule because of this.

Regardless of the setting of "OAE" and "ELE" in FF_MT_CFG Reg:0x15 and values in 0x017 and 0x018, bit "EA" in FF_MT_SRC 0x016 is getting locked with "Z" axis up. Entire register is acting more like Portrait/Landscape at 0x10.

My intentions are simply to read the motion bit in 0x16 and activate, or deactivate the light. 
What am I doing wrong?

Labels (1)
Tags (1)
0 Kudos
1 Reply

1,265 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Sam,

Please try using the embedded transient detection function that triggers an interrupt when any of the enabled axes has exceeded a set acceleration threshold disregarding the static acceleration. So the data that is compared to the threshold to be exceeded is high-pass filtered data. For more info, please refer to the AN4071.

Best regards,

Tomas

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-609709%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMMA8652%2C%20problem%20with%20freefall%2Fmotion%20flag%20reading.%20Desperately%20need%20help!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-609709%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EI%20am%20using%20MMA8652FC%20accelerometer%20in%20on%20of%20my%20developments%20and%20desperately%20need%20help%20to%20solve%20the%20following%20problem%20as%20I%20am%20way%20behind%20schedule%20because%20of%20this.%3C%2FP%3E%3CP%3ERegardless%20of%20the%20setting%20of%20%22OAE%22%20and%20%22ELE%22%20in%20FF_MT_CFG%20Reg%3A0x15%20and%20values%20in%200x017%20and%200x018%2C%20bit%20%22EA%22%20in%20FF_MT_SRC%200x016%20is%20getting%20locked%20with%20%22Z%22%20axis%20up.%20Entire%20register%20is%20acting%20more%20like%20Portrait%2FLandscape%20at%200x10.%3C%2FP%3E%3CP%3EMy%20intentions%20are%20simply%20to%20read%20the%20motion%20bit%20in%200x16%20and%20activate%2C%20or%20deactivate%20the%20light.%26nbsp%3B%3CBR%20%2F%3EWhat%20am%20I%20doing%20wrong%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-609709%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-609710%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MMA8652%2C%20problem%20with%20freefall%2Fmotion%20flag%20reading.%20Desperately%20need%20help!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-609710%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Sam%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EPlease%20try%20using%20the%20embedded%20transient%20detection%20function%20that%20triggers%20an%20interrupt%20when%20any%20of%20the%20enabled%20axes%20has%20exceeded%20a%20set%20acceleration%20threshold%20disregarding%20the%20static%20acceleration.%20So%20the%20data%20that%20is%20compared%20to%20the%20threshold%20to%20be%20exceeded%20is%20high-pass%20filtered%20data.%20For%20more%20info%2C%20please%20refer%20to%20the%20%3CA%20href%3D%22http%3A%2F%2Fcache.freescale.com%2Ffiles%2Fsensors%2Fdoc%2Fapp_note%2FAN4071.pdf%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAN4071%3C%2FA%3E.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3ETomas%3C%2FP%3E%3C%2FLINGO-BODY%3E