I am looking for a way to set up a GPIO as output during boot or any other permanent alternative.
My initial solution consisted in running a cronjob @startup executing the following commands:
echo 298 /sys/class/gpio/export echo out > /sys/class/gpio/gpio298/direction
The previous approach works fine, however, it takes a couple of seconds for this to be executed.
I’ve looked into other alternatives such as pinmax and device trees, but I can’t seem to fully understand the procedure.
Based on the GPIO TX2 Reference Table, the device tree name of the GPIO I am trying to control is can_gpio2_paa2. http://connecttech.com/resource-center/kdb342-using-gpio-connect-tech-jetson-tx1-carriers/
Also, (when exported) it is listed under
GPIOs 256-319, platform/c2f0000.gpio, tegra-gpio-aon: gpio-298 ( |sysfs ) in hi
I am using JetPack 3.3 and TEGRA 28.2.1
Any advice would be greatly appreciated!
UPDATE: setting the default value to low for this specific GPIO would be enough to solve my problem.