How do we do Interrupt generation in mems Accelerometer when data is ready using I2C ?

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

How do we do Interrupt generation in mems Accelerometer when data is ready using I2C ?

532 Views
Amit_Kumar1
Senior Contributor II

HI

I am using FXOS8700CQ mems Accelerometer + Magnetometer. I want to extract data from the device only when data ready flag is high. I have configured the interrupt register at INT1 pin to data ready flag, by default the pin goes high when an interrupt is generated. I am using K60 uc now on probing the interrupt pin, I can see the interrupt pin giving the square wave. following was the algo for activating interrupt

CTRL_REG4 ------> 0x01;

CTRL_REG5 ------> 0x01;

when I am polling data in infinite loop i.e

for (;;)

{

     read all data ();

}

I am getting the following wave  yellow---->SCL clock

blue -------> Interrupt (data ready)

pastedImage_4.jpg

when I try doing like

init_FXOS8700CQ();

for(;;)

{

}

I am getting the following trace

pastedImage_10.jpg

inthe ISR I am reading all acelerometer and magnetometer data (as I am using Hybrid mode) so the interrupt flag should go low and also the clock at SCL should be there but nothing is happening.

Please look into the matter.

regards

Amit Kumar

0 Kudos
0 Replies