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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL 2 IO
  4. Issue Reading GPIO 1146 (Pin 6 on J10) on VOXL2

Issue Reading GPIO 1146 (Pin 6 on J10) on VOXL2

Scheduled Pinned Locked Moved VOXL 2 IO
2 Posts 2 Posters 1.2k 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.
  • Amir AvniA Offline
    Amir AvniA Offline
    Amir Avni
    wrote on last edited by
    #1

    Hi,

    I'm trying to read values from GPIO 1146 (Pin 6 on J10), but the value always remains the same regardless of whether I connect it to 3.3V (high) or 0V (low).

    I successfully changed the direction to output and verified using a multimeter that writing '0' or '1' correctly changes the voltage.

    However, when I switch the GPIO to input mode, reading /sys/class/gpio/gpio1146/value always returns the same value, regardless of the external voltage applied.

    It seems that the value read from /sys/class/gpio/gpio1146/value is actually determined by the contents of active_low, rather than the actual pin state.

    voxl2:/sys/class/gpio/gpio1146$ cat /sys/class/gpio/gpio1146/direction
    in
    voxl2:/sys/class/gpio/gpio1146$ cat /sys/class/gpio/gpio1146/value
    0

    Is there a known issue with reading input values on this GPIO? Do I need to configure anything else (e.g., pull-up/down settings) to get correct readings?

    Thanks!

    1 Reply Last reply
    0
    • modaltbM Offline
      modaltbM Offline
      modaltb
      ModalAI Team
      wrote on last edited by
      #2

      Hi @Amir-Avni,

      Does your silkscreen on VOXL2 show M0154 or M0054?

      If M0054, it's 'hard coded' as an output only... behind a uni-directional level shifter.....

      If it's M0154, there's a directional level shifter in front of that GPIO that allows us to (with a kernel tweak) switch between UART and SPI.

      By default we are configured for UART use case, and the level shifter is set to allow an INPUT, by setting GPIO 67 low (as default), which is setup in device tree here, see "67" in modalai,gpio-init-output-low
      https://gitlab.com/voxl-public/system-image-build/meta-voxl2-bsp/-/blob/v1.8.02/recipes-kernel/linux-msm/files/dts/common/m0xxx-modalai-gpio.dtsi?ref_type=tags#L12

      To enable VOXL2 J10 pin6 (gpio46) as an input, make sure gpio67 is set to low

      1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev referenced this topic on

      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

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