Jump to content
I2Cdevlib Forums

MPU Interrupt Status Register


Recommended Posts

Hello! My name is Nicolas, I am from Uruguay and I am currently working on an University project with MPU-9150 integrated with a GPS.

 

First of all, I would like to congratulate for the work with the library. It has really helped me.

 

I have a question regarding the DMP6 example.

 

In the loop(), after the mpuInterrupt appears, the while is stopped and you check the Interrupt Status Register:

 

 

 // otherwise, check for DMP data ready interrupt (this should happen frequently)
    } else if (mpuIntStatus & 0x02) {
        // wait for correct available data length, should be a VERY short wait
        while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
 
      // rest of the code
 
   }
 
After having some issues integrating with gps data, I have checked the MPU 9150 Map Register and found that Interrupt Status Register bit 0 is the one that represents the Data Ready Interrupt. So why compare with 0x02 and not to 0x01?
 
Thank you very much
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...