Hey guys,
I’ve set up my TK1, added the universe to apt, and updated it a bunch of times. Now that I’m trying to test some GPIO features, I realize that there’s no GPIO directory. I’m under the impression that the /sys/kernel directory should have a gpio directory in it, which it does not. This may be related to the following error I get when I try to apt-get update:
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-armhf/Packages 404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-armhf/Packages 404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-armhf/Packages 404 Not Found [IP: 91.189.91.13 80]
Is there perhaps some mirror that I should be using to get these binary-armhf packages? Has anybody encountered this before?
Thanks!
-CS50 R&D
GPIO is exposed in /sys/class/gpio, and first you need to export the pin you’re trying to access. The numbering starts at 57.
ubuntu@tegra-ubuntu:/home/ubuntu# sudo su
root@tegra-ubuntu:/home/ubuntu# ls /sys/class/gpio
export gpio143 gpiochip0 gpiochip256 unexport
root@tegra-ubuntu:/home/ubuntu# echo 57 > /sys/class/gpio/export
root@tegra-ubuntu:/home/ubuntu# ls /sys/class/gpio
export gpio143 gpio57 gpiochip0 gpiochip256 unexport
Check out this page on using Jetson’s GPIO http://elinux.org/Jetson/Tutorials/GPIO
Thanks dustin_franklin, got it working!
ktaye
July 16, 2015, 3:50am
4
Hello dustin_franklin,
How can i access GPIO without using sudo?
Thanks
KT
Hi Folks,
The tutorial pointed above by Dustin_franklin is of great help.
I understood that TEGRA_PIN_PH1 (viz GPIO_PH1 ) maps to [i]_GPIO/i
However, I still can not figure out how these are related to the pysical pins on the board (namely how GPIO57 is indeed pin 50 on J3A1 ).
I have read the following files:
kernel/arch/arm/mach-tegra/gpio-names.h
kernel/arch/arm/mach-tegra/board-ardbeg.h
kernel/drivers/pinctrl/pinctrl-tegra*
All help is much appreciated.
Please refer to Jetson TK1 Development Platform Pin Mux or Pin Descriptions section of Datasheet for the GPIO_PX_XX mapping with actual signal ball on TK1.
https://developer.nvidia.com/rdp/assets/jetson-tk1-development-platform-pin-mux
https://developer.nvidia.com/rdp/assets/tegra-k1-datasheet
refer to the schematic for the actual GPIO connection on the board.