Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. How to increase i2c frequency -> no "bus_clk_rate" file to edit?

How to increase i2c frequency -> no "bus_clk_rate" file to edit?

Scheduled Pinned Locked Moved Ask your questions right here!
5 Posts 2 Posters 1.0k Views 1 Watching
  • 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.
  • tanguy sagereT Offline
    tanguy sagereT Offline
    tanguy sagere
    Contributor
    wrote on last edited by
    #1

    Hello! I'd like to permanently change the I2C frequency of the data from my lsm9ds1 IMU to a higher setting (currently reads at around 638 Hz on the VOXL2 using rostopic hz /imu_lsm9ds1/imu , but I find no bus_clk_rate file in /sys/bus/i2c/devices/i2c-1 (nor in the other devices for that matter) to open and write the desired frequency to (id like it as close to 1000Hz as possible).

    Is doing so possible; and if so, is there a file to be edited or command to be used for this?

    Thanks!

    1 Reply Last reply
    0
    • tanguy sagereT Offline
      tanguy sagereT Offline
      tanguy sagere
      Contributor
      wrote on last edited by
      #2

      Hi! Anyone have an idea how to fix this?

      tanguy sagereT 1 Reply Last reply
      0
      • tanguy sagereT tanguy sagere

        Hi! Anyone have an idea how to fix this?

        tanguy sagereT Offline
        tanguy sagereT Offline
        tanguy sagere
        Contributor
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • modaltbM Offline
          modaltbM Offline
          modaltb
          ModalAI Team
          wrote on last edited by
          #4

          Sorry for the lag bruh 😉 (your comment got my attention haha 😉

          "638 Hz" is not a standard I2C frequency really so I don't think that's what you need to be touching? I2C frequencies are generally 100k/400k (a LOT higher than 638).

          Where are you connecting your sensor on VOXL2?

          The VOXL 2 architecture has a few processors, the I2C on the 5G modem port is mapped to the applications processor. The I2C we use by default in PX4 is connected to a DSP (image here https://docs.modalai.com/images/voxl2/m0054-px4-block-diagram-0.4.png).

          For each driver we've used on the DSP, we've had to make a few small mods to get going. Here's an example of an I2C driver we use on the DSP for talking to a baro:

          Link Preview Image
          File not found · modalai/px4-firmware

          PX4 Autopilot Software. Contribute to modalai/px4-firmware development by creating an account on GitHub.

          favicon

          GitHub (github.com)

          It's enabled in the build here:
          https://github.com/modalai/px4-firmware/blob/voxl-dev/boards/modalai/rb5-flight/qurt.cmake#L55

          So what I think you likely need to do is modify your lsm9ds1 driver to obtain the rate you want?

          tanguy sagereT 1 Reply Last reply
          0
          • modaltbM modaltb

            Sorry for the lag bruh 😉 (your comment got my attention haha 😉

            "638 Hz" is not a standard I2C frequency really so I don't think that's what you need to be touching? I2C frequencies are generally 100k/400k (a LOT higher than 638).

            Where are you connecting your sensor on VOXL2?

            The VOXL 2 architecture has a few processors, the I2C on the 5G modem port is mapped to the applications processor. The I2C we use by default in PX4 is connected to a DSP (image here https://docs.modalai.com/images/voxl2/m0054-px4-block-diagram-0.4.png).

            For each driver we've used on the DSP, we've had to make a few small mods to get going. Here's an example of an I2C driver we use on the DSP for talking to a baro:

            Link Preview Image
            File not found · modalai/px4-firmware

            PX4 Autopilot Software. Contribute to modalai/px4-firmware development by creating an account on GitHub.

            favicon

            GitHub (github.com)

            It's enabled in the build here:
            https://github.com/modalai/px4-firmware/blob/voxl-dev/boards/modalai/rb5-flight/qurt.cmake#L55

            So what I think you likely need to do is modify your lsm9ds1 driver to obtain the rate you want?

            tanguy sagereT Offline
            tanguy sagereT Offline
            tanguy sagere
            Contributor
            wrote on last edited by tanguy sagere
            #5

            @modaltb Hey! Thank you for the reply ahaha, I understand its a busy quarter for everyone 🙂 We are connecting the IMU to the I2C3 pins of the J9 6-pin pinout of the 5G Modem. On other devices (such as the jetson AGX orin) we are able to get a data rate of 928 hz , but on the VOXL its stuck at around 628 Hz in ROS. For the ORIN we were able to increase the rate by modifying a bus_clk_rate file in /sys/bus/i2c/devices/i2c-1 but there appears to be no equivalent here. I found a voxl_i2c_write function in your docs that looks like it could increase I2C bus rate, but unsure how to access and use it. Also tried changing the device tree file to increase the rate ceiling and making a .patch to change it and add changes to kernel_patches but that dropped the rate to 120-ish, and never increased it. Quite confusing! Thanks for your time and have a nice day!

            1 Reply Last reply
            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            ModalAI
            Categories Recent Tags ModalAI.com Docs
            © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups