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

    I2C speed increase

    General
    esp-32 esp-8266
    2
    3
    391
    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
      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
        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
          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
          • First post
            Last post