I’m using the latest r36.3 release and I’d like to use the pin 13 of the 40-pins header as GPIO.
Using jetson-io.py it looks like the pin 13 is being used by pwm8 and there is no way to un-select that by using the jetson.io tool. Looking into the DTB it also not clear who is referencing that pin (for sure not pwm8).
I also tried to set that pin function to GPIO3_PR.00 function using the pinmux config tool, but after reflashing with the new pinmux configuration file nothing is changed.
This file has been put in the Linux_for_Tegra/bootloader/generic/BCT directory with the name tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi that is the pinmux file that is being used for my board during the flash procedure, the equivalent GPIO configuration file is placed into Linux_for_Tegra/bootloader.
After re-flashing the board the pin 13 is still seen as set by jetson-io.py:
You mean Linux_for_Tegra/bootloader/kernel_tegra234-p3737-0000+p3701-0005-nv.dtb ?
I don’t see my changes there but if I understood correctly I should not see any change at all in there because I’m not touching the kernel DTB, I’m changing the MB1 DTB.
At this point I have two questions:
How jetson_io is detecting that I still have the pwm8 function on the pin 13 and why I cannot un-set it?
Given the changes I made to the MB1 DTB, do I need to tweak also the kernel DTB to have the pin 13 configured as GPIO input?
You can refer this link to dynamically observe or modify gpio register values.
You need to refer TRM to arrive at correct address calculation for that.
Also since you want to set the gpio pin as input, your tristate has to be set to “disabled” I suppose, just cross check again.
It seems you want to use it as Input pin.
Jetson-IO is used to configure the function for the pin and their pinmux. (by adding custom.dtb under /boot)
It would not affect the pin configurations if you don’t run it.
Is there issue that it shows pwm8 in Jetson-IO when you use this pin as input?
as soon as I connect these signals to the 40-pin header, the line is kept UP by Jetson. As soon as I disconnect the pins from the Jetson header, I can see again the signals going up and down when rotating the encoder.
So, there is something wrong in the jetson PIN configuration that is preventing the signals to actually move but I’m failing to see where is the problem.