🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Mpu9250 interrupt pin

    Scheduled Pinned Locked Moved M5stack Grey
    4 Posts 2 Posters 10.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dkelly
      last edited by

      What pin of the esp32 is the mpu9250 interrupt pin connected to? I’m using a different mpu9250 library and want to leverage interrupts.

      Is there a m5stack gray pinout diagram somewhere? I only see a pinout for the core unit, and the mpu9250 is not shown on it.

      Thanks!

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        dkelly @dkelly
        last edited by

        @dkelly figured it out

        1 Reply Last reply Reply Quote 0
        • D Offline
          dda
          last edited by

          It should be 34. From MPU9250.cpp:

          // Configure Interrupts and Bypass Enable
          // Set interrupt pin active high, push-pull, hold interrupt pin level HIGH until interrupt cleared,
          // clear on read of INT_STATUS, and enable I2C_BYPASS_EN so additional chips
          // can join the I2C bus and all can be controlled by the Arduino as master
          writeByte(MPU9250_ADDRESS, INT_PIN_CFG, 0x22);
          writeByte(MPU9250_ADDRESS, INT_ENABLE, 0x01); // Enable data ready (bit 0) interrupt
          delay(100);
          

          0x22 = 34.

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            dkelly @dda
            last edited by

            @dda Thanks, I had tried 34 in the other Library and it wouldn’t work. But when I inserted the writeByte lines just as you showed, it worked. But i’m still having issues running my IMU via interrupt vs just times (like a fixed 1KHz). The timed approach always works, but the interrupt approach will crash sometimes or lock up. So something still seems off with the m5stack and the MPU9250. Also the magnetometer doesn’t seem to function properly on the m5stack for me, even after the battery pack with magnets is removed.

            1 Reply Last reply Reply Quote 0

            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
            • First post
              Last post