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

    Use SPI as UART with VOXL2 board

    Support Request Format for Best Results
    voxl2 uart device tree drivers
    2
    7
    461
    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.
    • L
      leon_hernandez
      last edited by

      I am currently using a VOXL2 board with Ubuntu 18.04 and I need more UART ports for my project.

      I would like to convert the SPI ports to UART as I'm currently not using SPI. However, I would like to do this without adding additional hardware such as a micro-controller or bit banging.

      Is it possible to reconfigure the SPI ports to UART by only changing the kernel device tree ?

      L 1 Reply Last reply Reply Quote 0
      • L
        leon_hernandez @leon_hernandez
        last edited by

        More specifically,

        I can see in the embedded linux documentation: 80-27572-2_REV_A_QRB5165_LE_1_0_Linux_Embedded_Platform_Software_Programming_Guide

        that it is possible to configure the QUP s for the board and that they all seem to support the three main communication protocols (UART, SPI, I2C).

        As such, my initial idea was to reconfigure the QUP (specifically QUP se11) of the board from SPI to UART.

        My initial idea was to:

        1. Remove the code configuring it to SPI

        2. Follow the documentation in Qualcomm Universal Peripheral (QUP) v3.

          to add the UART kernel using the same QUP and pins (QUP se 11, pins 60-63).

        Do you believe this would work ?

        If not, would you know of another way ?

        modaltbM 1 Reply Last reply Reply Quote 0
        • modaltbM
          modaltb ModalAI Team @leon_hernandez
          last edited by

          Hi @leon_hernandez ,

          How many UARTs do you need? We have 3 apps proc UARTs on the B2B connectors:
          https://docs.modalai.com/voxl2-linux-user-guide/#uarts

          None of the interfaces can change without a TrustZone update as well unfortunately, we've not found a way to disable TZ per Qualcomm, and this portion of the build is unfortunately closed source, here's the current map I have of this area: https://docs.modalai.com/voxl2-qups/

          -Travis

          L 1 Reply Last reply Reply Quote 0
          • L
            leon_hernandez @modaltb
            last edited by

            @modaltb

            Hey Travis,

            Just to add a bit of extra information, I'm using the standard VOXL2 board (not the Mini) and am using M0054. Furthermore, the system image version is v1.7.1.
            I would like to connect the VOXL2 board to another board and I would ideally like to use UART for this board-2-board communication.
            The current UART port is already occupied.

            As for the Trustzone update, I noticed this as well. I imagine it is not possible to disable the Trustzone due to Qualcomm's closed source software.
            However, if I may ask, how did ModelAI change SE14 from SPI to UART for the VOXL 2 Mini in M0104 ? https://docs.modalai.com/voxl2-qups/#:~:text=convert SE14 from SPI to UART for VOXL 2 Mini

            Is it not possible to replicate this ?

            If it's impossible, is there any alternative method you would recommend ?

            Best,
            Leon

            modaltbM 1 Reply Last reply Reply Quote 0
            • modaltbM
              modaltb ModalAI Team @leon_hernandez
              last edited by

              Hi @leon_hernandez ,

              Our VOXL2 is PCBA ID M0054, on this board there are directional level shifters on J10 that prevent remapping.

              VOXL2 Mini is M0104, on this board we introduced a bi-directional level shifter to allow us to make the SPI to UART, as the Qualcomm IC doesn't allow us to change something like SPI MISO to MOSI, or UART RX to TX, and there's a configuration on SE14 that makes it so we have to support two directions on one of the pins.

              We have a 'refresh' of VOXL2 that started shipping that DOES have this capability, the PCB ID is M0154. On this PCB in theory yes, but we haven't done this yet...

              You can detect which PCB ID you have using GPIOs:

              voxl2:/$ voxl-gpio -r 48
              0
              voxl2:/$ voxl-gpio -r 49
              0
              voxl2:/$ voxl-gpio -r 50
              0
              voxl2:/$ voxl-gpio -r 51
              0
              

              01a99f26-58e3-4298-aaab-ef057cec4d45-image.png

              1 Reply Last reply Reply Quote 0
              • modaltbM
                modaltb ModalAI Team
                last edited by

                forgot to add link: https://docs.modalai.com/voxl2-linux-user-guide/#hw-id

                L 1 Reply Last reply Reply Quote 0
                • L
                  leon_hernandez @modaltb
                  last edited by

                  @modaltb

                  Hey Travis,

                  Thank you very much for your explanation and for passing on the link.
                  I understand how it was done now.

                  I will consider what is the next possible option for the project.  
                  I appreciate your time.

                  Best Regards,
                  Leon

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