Dear teachers:
I have been using my self-designed motherboard to develop hardware programs recently, but I
found that GPIO5 is not within the 40PIN sequence. Therefore, when I use the library RPi.GPIO,
I cannot find the pin number. I would like to ask the teacher, how to define the PIN number for
GPIO outside of the 40PIN sequence?
What do 28,PCC.02,tegra234-gpio-aon,14,PCC.02,0x0c302028 mean here? Why did you choose this number?
Because I still have a lot of GPIO to set up, I must learn how to calculate it.
I modified the file “gpio_pin_data.py” (as shown in Figure 1 below) and wrote debugging code (as shown in Figure 2). However, an error like Figure 3 appeared during runtime.
I want to ask the “expert” where I went wrong and how I should make the corrections.
41 and 28 are just 2 unused number in JETSON_ORIN_NX_PIN_DEFS 41 is the number for GPIO.BOARD 28 is the number for GPIO.BCM PCC.02 is the name from sysfs(i.e. /sys/kernel/debug/gpio) tegra234-gpio-aon is its gpio controller (i.e. AON GPIO) 14 is the number from gpioinfo, it is line 14 of gpiochip1 [tegra234-gpio-aon]
line 14: "PCC.02" unused output active-high
0x0c302028 is the PADCTL for this GPIO(i.e. PADCTL_AO_SPI2_MOSI_0 in your case), you can get it from TRM.
Yes, I select 28 as BCM for GPIO05.
If you configure GPIO.setmode(GPIO.BCM) in your application, please just use BCM code for pin.
Please confirm that you’ve run sudo python3 setup.py install after you updated the gpio_pin_data.py.
Thank you for your guidance, but when I followed the “READ ME” installation, the following prompt appeared. May I ask if I missed any steps?
root@lstd:~# sudo pip install Jetson.GPIO
sudo: pip: command not found
root@lstd:~# sudo python3 /home/lstd/Downloads/jetson-gpio/setup.py install
Traceback (most recent call last):
File “/home/lstd/Downloads/jetson-gpio/setup.py”, line 21, in
from setuptools import setup
ModuleNotFoundError: No module named ‘setuptools’
root@lstd:~# sudo python3 setup.py install
python3: can’t open file ‘setup.py’: [Errno 2] No such file or directory
teacher:
Can you tell me how to find the contents of “0x0c302028” and “GP08_SPI2_MOSI”? I cannot find it on Jetson_orin_nX_and_orin_nano_deries_Pinmux_Cnfig_Template-v1.1.xlsm and Jetson Orin Series SoC Technical Reference ManualV1.2p.ddf.