SPE configuration Xavier NX

I’m trying to understand SPE on Xavier NX, and had a couple of questions.

  1. Currently we are working with a carrier that needs a gpio to be up even when the Jetson is powered off. After reading the docs, if i understand correctly SPE should work right?
  2. Also I modified the gpio example to toogle the gpio line that I need:
  • spe-freertos-bsp/rt-aux-cpu-demo-fsp/soc/t19x/include/can-aon-force.h
#ifndef _GPIO_AON_T19X_H
#define _GPIO_AON_T19X_H

#include <soc/t194/aon/processor/tegra-gpio-hw.h>

#define TEGRA_AON_GPIO_ID(bank, gpio) \
		gpio_global_id(TEGRA_AON_GPIO_CHIP_ID, TEGRA_GPIO(bank, gpio))

#define GPIO_CAN_TX TEGRA_AON_GPIO_ID(AA, 2) /* GPIO_AA 2, pin 145 */


  • spe-freertos-bsp/rt-aux-cpu-demo-fsp/app/can-tx-force.h

void can_force_app_init(void);

  • spe-freertos-bsp/rt-aux-cpu-demo-fsp/app/can-tx-force.c

#include <err-hook.h>
#include <printf-isr.h>
#include <stdio.h>
#include <osa/rtos-task.h>
#include <gpio/tegra-gpio.h>

/* can-aon-force.h has GPIO_APP* defines */
#include "can-aon-force.h"
#include "can-tx-force.h"

#define GPIO_OUT_SET_DELAY	5000

static bool toogle_gpio = false;

static void gpio_app_task(void *pvParameters)
	int val;

	val = tegra_gpio_direction_out(GPIO_CAN_TX, 0);
	if (val) {
		error_hook("tegra_gpio_direction_out failed\r\n");

	while (1) {
		tegra_gpio_set_value(GPIO_CAN_TX, toogle_gpio);
		toogle_gpio = !toogle_gpio;

void can_force_app_init(void)
	rtosTaskParameters gpio_app_task_params = {
		.pvTaskCode = &gpio_app_task,
		.pcTaskName = (char *)"gpioapp",
		.uxPriority = rtosIDLE_PRIORITY,
		.pvParameters = NULL,
		.uxStackDepthBytes = 512,

	int val = rtosTaskCreate(&gpio_app_task_params, NULL);

	if (val != rtosPASS)
		error_hook("xTaskCreate for gpio_app_task failed\r\n");

Then copied the spe.bin to bootloader/spe_t194.bin. But I’m not seeing any changes on the line with a multimeter. I disabled mmtcan overlay on dtb and any reference to the gpio on it as well. Lastly I applied the pinmux config suggested on the can example of spe. So im not sure if im missing something.
I tried flashing it like

  • sudo ./flash.sh -k spe-fw jetson-xavier-nx-devkit-emmc mmcblk0p1
  • sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

So I’m not sure if I misunderstood the documentation, or what could be happening.

Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

Hello, andres.artavia:
Xavier NX cannot support ‘a gpio to be up even when the Jetson is powered off’.
To support such feature, you may need an extra hardware to do that.

For GPIO sample, you can just follow the instructions in rt-aux-cpu-demo/doc/gpio.md. But SPE can only run when the device’s power-on.


Understood, thanks for the clarification.

Also to verify, what’s the behavior of SPE during reboots on the Jetson? Does it goes down as well?

Also to verify, what’s the behavior of SPE during reboots on the Jetson? Does it goes down as well?

Yes. SPE firmware will also be re-loaded and re-start when the whole device reboots, just like other components.


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