ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to Enable QUP19 and QUP13 as UARTs on VOXL 2 (ttyHS2 / ttyHS3)?

    Support Request Format for Best Results
    3
    9
    144
    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.
    • Y
      yardy
      last edited by

      Hi everyone

      I'm working on a VOXL 2, M0054 , voxl2_SDK_1.4.1

      I’ve successfully used /dev/ttyHS1 (QUP7) via J3, but I’m currently trying to enable and use:

      /dev/ttyHS2 → QUP19 (GPIO 2 and 3, J5 pins 48 and 49)
      
      /dev/ttyHS3 → QUP13 (GPIO 38 and 39, J5 pins 97 and 98)
      

      These devices show up in /dev, but the corresponding pins remain unclaimed in the pinctrl debug output:

      cat /sys/kernel/debug/pinctrl/*/pinmux-pins | grep -E 'GPIO_2|GPIO_3|GPIO_38|GPIO_39'
      
      pin 2 (GPIO_2): 894000.qcom,qup_uart (GPIO UNCLAIMED) function qup19 group gpio2  
      pin 3 (GPIO_3): 894000.qcom,qup_uart (GPIO UNCLAIMED) function qup19 group gpio3  
      pin 38 (GPIO_38): a94000.qcom,qup_uart (GPIO UNCLAIMED) function qup13 group gpio38  
      pin 39 (GPIO_39): a94000.qcom,qup_uart (GPIO UNCLAIMED) function qup13 group gpio39 
      

      How can I claim it to UART?

      Many Thanks!

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @yardy
        last edited by

        @yardy ,

        Since the devices appear in /dev/ttyHS*, it means they are already mapped and pins are claimed by the kernel, so it's all set up. You will just need to use the correct adapter board that plugs into VOXL2 and exposes these uart connections.

        The GPIO mapping is not relevant here because the pins are not used as GPIO (different kernel driver (uart) ).

        Alex

        Y 1 Reply Last reply Reply Quote 0
        • Y
          yardy @Alex Kushleyev
          last edited by

          @Alex-Kushleyev

          thanks for replying.
          I'm using the dev test board but couldn't establish the comm

          any ideas?

          B.R

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @yardy
            last edited by

            @yardy , can you please clarify how exactly you are testing the communication using HS2 and HS3?

            Y 1 Reply Last reply Reply Quote 0
            • Y
              yardy @Alex Kushleyev
              last edited by

              @Alex-Kushleyev , Thanks for the response!

              VOXL 2 mounted on the VOXL 2 Developer Test Board.
              CP2102 USB-to-UART dongle connected to my PC.
              For QUP19 (ttyHS2):

              GPIO_2 (TX) connected to RX on CP2102 via JP1 (for level shifter) and J9
              GPIO_3 (RX) connected to TX on CP2102 via JP1 (for level shifter) and J9
              GND to GND

              on the voxl2:

              stty -F /dev/ttyHS2 115200
              cat /dev/ttyHS2
              
              echo "Hello from VOXL2 HS2" > /dev/ttyHS2
              

              on my PC:
              OS: Ubuntu 22.04

              screen /dev/ttyUSB0 115200
              

              When I send text from the PC side, I expect it to appear in the cat output on VOXL2, and vice versa.

              with /dev/ttyHS1 it works.

              VinnyV 1 Reply Last reply Reply Quote 0
              • VinnyV
                Vinny ModalAI Team @yardy
                last edited by

                Hi @yardy
                Are you using the jumper blocks J14.15/J14.17 to JP1.10/JP1.12 respectively for QUP_19?
                3bc252f7-62fd-405c-bbba-3952ac1d8135-image.png
                That will result in 3.3V RX/TX signals at J9 on M0144.
                df8a06bd-c23f-4c7f-bd00-ae3fce0529b2-image.png

                Just want to clarify so that SW is not chasing any red herrings.
                Thanks!

                Y 1 Reply Last reply Reply Quote 0
                • Y
                  yardy @Vinny
                  last edited by

                  @Vinny
                  yes I am.

                  Alex KushleyevA 1 Reply Last reply Reply Quote 0
                  • Alex KushleyevA
                    Alex Kushleyev ModalAI Team @yardy
                    last edited by

                    @yardy ,

                    Can you please try the following:

                    • install screen on voxl2 by running apt install screen, then you can use the tool to simplify your testing.
                    • bridge the RX and TX for a particular UART that you are testing (on the Developer Test Board) and run a simple test such as :
                    screen /dev/ttyHS2 115200
                    

                    When you type into the terminal while running screen, if the communication is working, you should see the characters that you type being printed in the terminal.

                    If you still do not see any chars in this test, please use an oscilloscope to probe the UART TX line at the test board (while TX is not connected to the RX) and see if you see any data on the waveform when you type in the terminal on the voxl2 side while screen is running.

                    Alex

                    Y 1 Reply Last reply Reply Quote 0
                    • Y
                      yardy @Alex Kushleyev
                      last edited by yardy

                      @Alex-Kushleyev

                      
                      Hi @yardy
                      Are you using the jumper blocks J14.15/J14.17 to JP1.10/JP1.12 respectively for QUP_19?
                      

                      It was connected to JP1.9/JP1.11 (because of the jumpers... I was wrong)

                      It's working!

                      Many thanks🤙

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | Contributors