SPE GPIO Application not working

I followed the directions here for running the GPIO Application on my Orin AGX. Pin 16 BB1 should output a high pulse for 3 seconds, then go low for 3 seconds according to the code. Pin 32 BB0 is configured as an input and when it receives a pulse there should be a message printed. When I look at the pins on an oscilloscope, Pin 16 is always low. It never goes high even when the GPIO application prints “gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger”. Pin 32 is always high.

Is there any way to debug this?

One thing that seemed odd to me was that in tegra234-mb1-bct-gpioint-p3701-0000.dts, all of the pins are initially set to <4>, which I’m assuming means input since in tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi they are initially in the gpio-input section, and the patch is to change Pin 32 BB0 from <4> to <2>. I would think Pin16 BB1 should be changed since it is being changed from input to output (and also it is Pin 16 BB1 that is changed from 4 to 2 in the Xavier AGX version of the instructions). I tried this but it didn’t work.

Hello,
After you make the change 1-4, have you ever re-flash the whole device?

I will test locally and update the thread later. It may take time.

br
Chenjian

Hi, thank you for the reply. Yes I reflashed the whole device after making those changes.

Also, I forgot to mention I am on version 35.1.0.

Hello,
I’ve tested BSP 35.1 with corresponding SPE firmware package.
And it works well. Paste my local test log for your reference.
(I also checked waveform in PIN 16, and it can toggle between 0 and 3.3)

gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0
gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0
gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0
gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0
gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0
gpio_app_task - Setting GPIO_APP_OUT to 1 - IRQ should trigger
can_gpio_irq_handler - gpio irq triggered - setting GPIO_APP_OUT to 0

Please double confirm in your side and make sure everything is followed the guide in gpio.md.

br
ChenJian

Hi, Thanks for checking.
script.sh (4.8 KB)
This is the full script I used to download, patch, build and flash the kernel. Can you take a look at this and see if there is anything incorrect about the process I used? Also could you tell the steps you used to download the kernel, build, apply the binaries, etc?

I also tried using the SDK Manager to download Linux_for_Tegra/ in ~/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_AGX_ORIN_TARGETS/ and modifying things directly in there. Basically I did what my script does except I did it by hand in this directory. I applied the patches by hand, ran nvbuild.sh, copied the files generated in kernel_out to the right places, ran apply_binaries.sh, copied spe.bin to booloader/spe_t234.bin, then flashed and had the same results. Pin 16 is always low and Pin 32 is always high.

I also tried on two separate Orin AGXs to make sure it wasn’t an issue with a pin being fried.

Hello,
The script looks good.
Will you please upload the full flash log of
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

From your result, it looks that the change in GPIO config does not work. But I have to check the flash log to check why.

br
Chenjian

flash_log.txt (79.9 KB)
Here is the flash log.

Hello,
From the log, the pinmux file in your system is
copying pinmux_config(/home/john/Downloads/fresh_jetson_35/Linux_for_Tegra/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000.dtsi)… done.

And the updated file is: ${L4T}/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi

Please edit the file bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000.dtsi with same changes as doc described and try again.

br
Chenjian

This works. Thank you!

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