SPE gpio enabling

In order to access a AON GPIO from the Cortex-R5 SPE/AON for Jetson AGX; the GPIO SCR, GPIO interrupt map and pinmux settings need to be updated as described in below steps.

  1. Update SCR values as below in the file tegra194-mb1-bct-scr-cbb-mini.cfg:

scr.41.6 = 0x18001010; # GPIO_BB_SCR_00_0 scr.42.6 = 0x18001010; # GPIO_BB_SCR_01_0

  1. Update gpio interrupt mapping as below in tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg:

gpio-intmap.port.BB.pin.0 = 2; # GPIO BB0 to INT2 gpio-intmap.port.BB.pin.1 = 2; # GPIO BB1 to INT2

  1. Update default pinmux configuration as below in the file tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg:

pinmux.0x0c2f1800 = 0x00000003; # CONFIG BB0 output pinmux.0x0c303040 = 0x0000c004; # can1_stb_pbb0 pinmux.0x0c303048 = 0x0000c044; # can1_en_pbb1

  1. Compile device tree and flash the entire board to ensure that the SCR, gpio interrupt mapping and pinmux settings are flashed on the board.
  2. Short GPIO pins of the 40 pin header J30 pin 16 and pin 32, this should print out “GPIO input irq triggered” message since pin 16 is configured as OUT which drives the pin 32 which is configured as INPUT and also has interrupt enabled.

i have done above config and replace tx19 spe bin device tree and Image but irq enabled message is not coming .
can anyone help me on this

Can you use scope to check the pin level when SPE GPIO app is running. Whether the output pin toggles?


hi i checked 16th gpio and i am getting .05 voltage and while reading memory of the above registers the value is getting changed comparing with sensor value what we need to right

Do you mean that the GPIO cannot output high?
Can you also check from kernel side, that GPIO can toggle through sys-FS control?


echo 1 > /sys/class/gpio/PBB.00/value and measured the voltage in 16 pin but value is still 0.05

gpio-313 (PBB.00 |sysfs ) out hi
gpio-314 (PBB.01 |sysfs ) in lo

after configuring in sysfs able to see the 3.3 in 16th pin.

but print is not coming

for Device tree as per manual only configured but its not working.

275: 0 0 0 0 gpio 43 Edge 3400000.sdhci cd
276: 2 0 0 0 gpio 77 Edge 15200000.display
277: 0 0 0 0 c360000.pmc 83 Edge sw-wake
278: 0 0 0 0 gpio 36 Edge force-recovery
279: 0 0 0 0 gpio 27 Edge power-key
280: 0 0 0 0 PCI-MSI 134742016 Edge ahci[0001:01:00.0]
281: 0 0 0 0 gpio 149 Edge bluetooth hostwake
282: 1 0 0 0 gpio 119 Edge rt5659
283: 15 0 0 0 gpio 10 Level 1-0008
284: 0 0 0 0 gpio 46 Level tmp451
286: 1 0 0 0 gpio 40 Level 2490000.ethernet:00
288: 0 0 0 0 gpio 9 Edge gpiolib

GPIO 314 interrupt also not enabled

GPIO test in sys-FS only confirms

  1. hardware is good.
  2. pins are correct.

So in sys-FS, when you configured one pin by output, another pin by input, connect two pins, and changed output pin, you can get the correct value in input side?
Let’s confirm this first.

Then we can proceed to SPE firmware.

  1. Add some print code in GPIO loops, and make sure the app runs as expected.
  2. When GPIO output is updated in SPE firmware, check the voltage of output pin, and check whether it toggles as expected.
  3. If the interrupt still does not happen, but 2 is good, re-check the configurations in gpio.md, and confirm everything is updated. especially interrupt mapping. It’s better to re-flash the device to make sure the changes are working.


with above point i done .
shorted 16th and 32nd pin and given
echo 1 and echo 0 32 pin able to detect the voltage but interrupt is not coming.

can you please help me to check how to check interrupt and enable it and how to check SPE is running .

steps i follwed for enabling gpio:
1.set Enable_gpio=1 in target_specific.mk in t19x folder

2.build it for t19x target make_bint19x
and replaced the binary in /bootloader.

3.changed pinux config in jetson package.

4.tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg file is not present so where the int register is there i have changed the value.

is 4th step is valid .

And i am tried to get logs for SPE in serial but unable to do it.
is there any way for that if its there please provide me thanks.


For your comment

4.tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg file is not present so where the int register is there i have changed the value.

is 4th step is valid .

Do you mean you skipped this step?
If then, the GPIO interrupt will not map to SPE.

Let’s do this one by one.

  1. In kernel side, I think you have already verified the GPIO pins are good.
  2. BSP part, tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg is in ./bootloader/t186ref/BCT/tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg
  3. You should observe that output pin is toggling if GPIO app is running correctly.

For SPE log, please take a look at Jetson/AGX Xavier Tegra Combined UART - eLinux.org
SPE: /dev/pts/xx is the port for SPE debug information output.


while i am building spe firmware i am getting spe.bin and replacing the same binary in /bootloader/spe_t194.bin is that correct.


For SPE firmware compile and flash, you can take a look at l4t-rt/rt-aux-cpu-demo/doc/compile-flash.md, which contains detailed information.

I think you should use Xavier AGX (T194), and the built firmware should be l4t-rt/rt-aux-cpu-demo/out/t19x/spe.bin*


hi ,

i got spe.bin and i replaced the spe.bin in /bootloader/spe_t194.bin .

Is that correct.


It should be good. In addition, you can add some print code in SPE firmware to confirm the new firmware works.


Hi ,
Now i am able to probe 3.3v in 16 pin of agx xavier .

thanks for your help :)


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