Yes. Need to configure these PINS as GPIO pins(if at all they are not configured as GPIO already in the PIN MuX sheet by default). I have configured all or most of them and converted to CFG file but it needs to be tested them on the target board still
Is there software tool (may be python based) we have to test these GPIO pins by changing there state as pull up/pull down etc on the target board.
Hi,
Could you try to clarify what is wrong here? For example, GPIO05. What do you want for it and does it meet what you need with current cfg? I checked your cfg file and notice you just set it as output-low pin.
The pinmux spreadsheet is to decide the initial state of a pin. If you want to control it to other state after boot, then it is not the role of pinmux spreadsheet.
As per the requirement from our hardware team they tell, That it will be used as a switch PIN where toggling it has high/low will change state as 0/1 and used a switch to change the UART as RS232 or RS422.
So in PiNMUX sheet we set it as output pin with state initialized with active 0(low).
Using any other tool later we need change the pin state to high to toggle it.
Hi,
Generally a gpio state will be changed if you write it in your own kernel driver. Basically that is Linux kernel GPIO API. You can find resources over some online resoureces.
A simple tool that can use to control from userspace.
Pinmux spreadsheet only provides the initial state. It does not toggle. Must use above methods.
1 Like
Yes. I understand that fully now.
So next want to know any method available to change the state of GPIO pin after boot on the target pc
Just keeping this topic active…
What do you need to know here? I thought you already knew what to do.
Yeah.
Currently I am working on my audio stuff… As this thread might close in 14 days if not active so replied.
Once I start working on this GPIO again and any issues will post here
1 Like
https://docs.nvidia.com/drive/active/5.0.10.3L/nvvib_docs/index.html#page/NVIDIA%20DRIVE%20Linux%20SDK%20Development%20Guide/Platform%20Interfaces/gpio_number.html
We are trying to make GPIO pins high/low using the procedure given in the above link. But it is not working for us as per the above snapshot.
please let us know what might be the issue.
You could learn gpio sysfs from google search first…
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
Also, please do not check Drive platform document… they won’t work on Jetson…
1 Like
Our team is saying the same steps worked for Jetson AGX Xavier for linux BSP version 32.5.2 and kernel version is 4.9.
Currently we are working Linux 35.4.1, Jetson AGX Xavier Industrial , kernel version 5.10.
Is there any limitation in this version of kernel where it does not allow to modify the gpio values?
No, there is no limitation. It is just you cannot just randomly pick a value “387” for your gpio.
This value would change…
We are using the same formula as shown in he below link, to arrive at the GPIO number that we want. But still we are getting the error and not able to modify ‘direction’ field.
Note: In our case the base address values obtained are different from 288 ( as mentioned in the website ) as shown below:
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_xavier.html#wwpID0E0MN0HA
Hi,
Let me ask a silly question first. Was that gpio387 really present on your device or not?
Did you remember to export it before you try to toggle it or not?
We are using GPIO24 which is GPIO3 PM.03( Port M) as highlighted in the below snapshot from PINMUX sheet.
We are using the same formula for calculating the GPIO number. We arrived at the number 434, but the same number is not mapped to GPIO PM.03 in the list, we obtained when we execute the command:
“# cat sys/kernel/debug/gpio”
Pls find the log from this command as shown below:
gpiolog.txt (7.5 KB)
Hi,
Please directly use the /sys/kernel/debug/gpio to tell the number. I remember that formula does not work anymore after rel-35.
1 Like
we are still getting errors, even if we use the gpio numbers displayed from the command as shown above.
pls let us know why it is giving such errors when we try to change the direction, value etc.
Hi,
just want to double confirm… could you read what is /sys/class/gpio be like after you export the 413 to gpio…?
Now it is working fine. Thanks.
We are able to change the pin direction to out or in.
also we are able to set values 0 and 1 when the GPIO pin is used as " Out"
But we are not able to change the values to 0/1 when it is type “in” any idea why?
Pls find the below snapshot giving write error when you try to modify the value 0/1 when it is set as “in” type:
As I already said… you really should read gpio sysfs thing on some linux kernel document…
2 Likes