Hi,
I am trying to use GPIO03 (ball name: SPI2_SCK, GPIO: GPIO3_PCC.00) as an input for a rotary encoder. As this is a very easy electrical component, I was surprised, that it wasn’t working. To test the GPIO, I put GND and 1,8V at the pin and read the value → It alway reads 0. If I use the pin as an output, the voltage at the pin is always 0V. While doing these tests, there is nothing connected at the pin. After some further investigation, I tried different pinmux settings according to the TRM (default is 0x2):
sudo busybox devmem 0xc302048 16 0x55
sudo busybox devmem 0xc302048 16 0x52
sudo busybox devmem 0xc302048 16 0x42
To test, that the changing of the value is working, I ran the following command.
jetson@jetson:~/logicJet$ sudo cat /sys/kernel/debug/tegra_pinctrl_reg | grep "sck"
Bank: 1 Reg: 0x0c302048 Val: 0x00000052 -> spi2_sck_pcc0
But all these tests were unsuccessful.
Other information:
JetPack 4.6
Script to test GPIO:
jetson@jetson:~/logicJet$ sudo su
root@jetson:/home/jetson/logicJet# echo 304 > /sys/class/gpio/export
root@jetson:/home/jetson/logicJet# echo in > /sys/class/gpio/gpio304/direction
root@jetson:/home/jetson/logicJet# cat /sys/class/gpio/gpio304/value
0
Is there something that I have overlooked? Is there something special with this pin? I am using a lot of other pins, but two aren’t working (on several boards).
Any help is appreciated.
Greetings,
Fabio