M5StickC - MPU-6886 Data Ready Interrupt & Read Process
-
I'm looking to use the data ready interrupt on the MPU-6886 to know when to get data from the sensor. I've been trying to piece it together from the documentation and other sites, and I think I have the process worked out, and am just hoping someone can verify it for me.
Step 1
Setup the interrupt handler on GPIO35 to trigger on changeStep 2
Because there are multiple devices which can trigger an interrupt on GPIO35, we need to read the INT_STATUS register on the MPU-6886 to verify there is data ready, which tells us it was the MPU that triggered the interrupt.Step 3
We read the accel and gyro data from the MPU.Obviously steps 2 & 3 happen outside of the interrupt function.
There is a potential Step 0 where we might have to configure the MPU to on how it triggers the interrupt pin, but going by their documentation, it looks like as long as the interrupt handler is triggered on change, and the INT_STATUS register gets cleared (which happens when we read it) we should be fine.
Overall, does this sound correct?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login