Jetson TX2 How to development GPIO , I2C, SPI,PWM
You could find answer from TX2 Configuring Pinmux GPIO and PAD section in [url]https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-2-ga[/url]
Thanks a lot !
But I Can’t using GCC Development TX2 FW, Can teach me ? Thanks!
You’ll need to be much more specific as to what it is you want to learn. What @kayccc mentioned is the starting point for all of it though because pins must be configured for a function prior to any other access or programming…if the pin isn’t configured as the GPIO of the type you need, then there is nothing you can do with it.
im currently having problem with my GPIO ,
in the directory sys/class/gpio
only contain folder gpiochip for 216,240,224,256,320
which all these are not point out to the GPIO J21 pinout .
im using TX2 Dev kit ,
im using GPIO to beep a buzzer , thinking of using gpio388/GPIO26 pin .
how do i update all the contain in the GPIO directory ?
I don’t know which GPIO goes to J21, but in general (if you know the number), then check “/sys/kernel/debug/gpio” to see current configuration:
sudo -s cat /sys/kernel/debug/gpio exit
Actual configuration is to either export or unexport. For reference, go to “/sys/class/gpio/”, and notice files “export” and “unexport”. As soon as a particular gpio is exported there will be a symbolic link created with that number in that directory, plus the “/sys/kernel/debug/gpio” file will be updated. Example:
sudo -s echo 388 > /sys/class/gpio/export grep 388 /sys/kernel/debug/gpio # will show gpio-388 config. exit
Within the symbolic link directory which appears when a gpio is exported you can echo “in” or “out” to direction, or similar to other control files (or read via “cat value”).
hi thankyou for ur respond ,
i’d done all the above
could you please review this ;
this happen when im try to bash the file .
“su” by itself won’t work on Ubuntu since the root account is locked. You’ll need to use “sudo” (“sudo -s” puts you into a root shell…or there are similar ways, e.g., “sudo su”). Most access of “/sys” will be denied if you don’t use root permissions (which any sudo accomplishes). This is why the initial example shows “sudo -s”…to put all future commands into a root shell until running “exit”.
Example based on your script: