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

    I2C speed increase

    Scheduled Pinned Locked Moved General
    esp-32 esp-8266
    3 Posts 2 Posters 2.0k Views
    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.
    • A Offline
      alkaline64
      last edited by

      2025-02-1kk8_12-04-47.PNG

      Hi to All

      I use a M5 Stack Core Basic and it's working fine.

      I try to read the values from the IMU with the I2C bus as quickly as possible.
      It' works well.
      Unfortunately I have a long pause of 124uSec between the bytes, which limits the speed. Can I do something to shorten this pause or remove it completely?

      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A Offline
        ajb2k3 @alkaline64
        last edited by

        @alkaline64 have you checked the data sheet for the IMU?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          alkaline64 @ajb2k3
          last edited by

          Hi @ajb2k3

          Yes I have checked the data sheet and it's working fine. Just read all the byte need to long time in my program even if I read with 1Mega.
          I suspect it would be twice as fast without this pause.

          I found a information about this break, but i have no idea how to do this with the Uiflow

          activate polling mode (use portMAX_DELAY)
          The last parameter -1 stands for the timeout in milliseconds. If you want to ensure that no RTOS scheduling is delayed, you can set portMAX_DELAY
          i2c_master_transmit_receive(dev_handle, buffer, 2, buf, 9, portMAX_DELAY);

          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