Gpio/mux devkit help

Hi,

I’m looking to control a GPIO on the Orin AGX devkit, which is capable of driving around 20-30mA.

I’m on R36.4.3 and following the online manual I can configure the devkit’s pin7 using:
busybox devmem 0x02430070 w 0x004
and then:
gpioset gpiofind "PQ.06"=1
it all works - but pin7 is limited to 20uA.

According the carrier board specs, pin8 (UART1_TXD) and pin11 (UART1_RTS) are capable of driving 24mA.

I’m trying to control those pins, but it seems they stay high (3.3V), despite my attempts. Everytime I try to toggle them (whether 0->1 or 1->0), they drop to 0V for ~20us and then rise to 3.3V again - see capture below. I have no problem to control pin7, but interestingly, it seems its output voltage is ~2.3V and not 3.3V.

mux configuration:
robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x02430098 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070
0x00000004
robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8
0x00000004
robot@aziza:~/aziza$ sudo busybox devmem 0x02430098
0x00000004

switch all pins to zero:
robot@aziza:~/aziza$ gpioset gpiofind "PR.02"=0
robot@aziza:~/aziza$ gpioset gpiofind "PR.04"=0
robot@aziza:~/aziza$ gpioset gpiofind "PQ.06"=0

switch all pins to one:
robot@aziza:~/aziza$ gpioset gpiofind "PQ.06"=1
robot@aziza:~/aziza$ gpioset gpiofind "PR.04"=1
robot@aziza:~/aziza$ gpioset gpiofind "PR.02"=1

what am I doing wrong?

online docs:

Hi bardavid52,

Have you also used a scope(instead of logical analyzer) to check its signal?
Please check its pinmux register at this moment.

Have you applied the following patch before controlling GPIO in JP6.x?
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF

Hi, yes, pin7 reaches ~2.2V when set to one, please see below:

pinmux register values:

robot@aziza:~/aziza$ sudo busybox devmem 0x02430070
0x00000054
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070
0x00000004
robot@aziza:~/aziza$ gpioset gpiofind "PQ.06"=1
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070
0x00000404
robot@aziza:~/aziza$ sudo busybox devmem 0x02430070
0x00000404

I have not applied any patch - I’m using a vanilla R36.4.3 as released by nvidia without any changes. is it needed to apply patches manually? thank you

I have noticed that when configuring pin8 pinmux:

robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8
0x00000400
robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8
0x00000004

The pin starts low - on 0V.

Then after setting it to 1:

robot@aziza:~/aziza$ gpioset gpiofind "PR.02"=1

The pinmux register goes to 0x404:

robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8
0x00000404

And at this point I can’t set it to 0 again.

If I try:

robot@aziza:~/aziza$ gpioset gpiofind "PR.02"=0

Then it goes to 0V, but jumps back to 3.3V after 40-50us (see attached).

But, interestingly, if i again set its pinmux register to 0x004:

robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8 w 0x004
robot@aziza:~/aziza$ sudo busybox devmem 0x024300A8
0x00000004

Then it does go to 0 again.

Ok I found out the reason for the pin7 low voltage - it was my fault - it was connected to a FET which probably drew more current it could handle. Without it, I get ~3V (still not 3.3V, but maybe it’s reasonable):

So only problem left is why I can’t set back pin8 to 0V, without setting its pinmux register value again, and why its pinmux register value changes to 0x404 after I use gpioset to set it to 1.

ok read the thread with the patch, it sounds like this is the solution, thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.