How to Enable QUP19 and QUP13 as UARTs on VOXL 2 (ttyHS2 / ttyHS3)?
-
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!
-
@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
-
thanks for replying.
I'm using the dev test board but couldn't establish the commany ideas?
B.R
-
@yardy , can you please clarify how exactly you are testing the communication using HS2 and HS3?
-
@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 GNDon the voxl2:
stty -F /dev/ttyHS2 115200 cat /dev/ttyHS2
echo "Hello from VOXL2 HS2" > /dev/ttyHS2
on my PC:
OS: Ubuntu 22.04screen /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.
-
Hi @yardy
Are you using the jumper blocks J14.15/J14.17 to JP1.10/JP1.12 respectively for QUP_19?
That will result in 3.3V RX/TX signals at J9 on M0144.
Just want to clarify so that SW is not chasing any red herrings.
Thanks!