Hello forum! I have a Jetson Xavier with lastest JetPack, but I can’t control GPIO. Example (https://www.youtube.com/watch?time_continue=1060&v=2LctZ8n1Wl0) shows a dir /sys/class/gpio/gpio393 to contol GPIO. But I have no such similar. How can I do this?
may I know which pin you would like to control?
some information as below for your reference.
- you should check the module pin names in Jetson AGX Xavier Pinmux.
- please refer to Xavier’s GPIO definitions,
- please also refer to Tegra Linux Driver Package TX2 Adaptation Guide-> [GPIO Changes] for the GPIO mapping formulas.
- another discussion thread, Topic 1001584 about GPIO you could refer to.
Thx. These materials helped me a lot. It would be great to get an example of control on с / с ++. I found a ready solution in python, what if it could be useful to someone (https://pypi.org/project/Jetson.GPIO/) .
For an example of control on с, please see:
The discussion thread you mention just describes problems, but no solutions. I in particular can’t drive a pin, although everything seems ok. I can export the pin, change direction to output and write a value, but the output never changes - it is always the same -
This is clearly some goof-up, otherwise exporting the pin will always fail.
So the question is has anyone(perhaps you) got it to work and how? And why are there some many posts on GPIO but no solution to correct it.
Here’s an example for driving GPIO from user level C/C++:
Note that the specific GPIO port names/addresses are taken from the Jetson Nano; you’d have to update the code to match the address map of the Xavier.