Changing SPE UART from serial2 (debug port) to serial0?

Hi,

I tried to capture the SPE/AON logging from the debug port, but functionality seems to be broken on the board I’m using (Floyd BB02).
I’m now trying to change SPE logging to use serial0 (/dev/ttyTHS0). For that, I did the following:

  • disable /dev/ttyTHS0 on the linux side in $kernel/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3509-0000-a00.dtsi
        ...
        serial@3100000 {
                status = "disabled";
        };
        serial@3110000 {
                status = "okay";
        };

after booting, I indeed can verify that /dev/ttyTHS1 exists, but not /dev/ttyTHS0

  • configure SPE SW for Xavier NX and disable combined logging in $spefw/rt-aux-cpu-demo/soc/t19x/target_specific.mk
...
ENABLE_SPE_FOR_NX := 1
...
ENABLE_COMBINED_UART_SERVER := 0
  • change SPE FW UART to uarta in $spefw/l4t-rt/freertos-common-t19x/include-soc/t194-aon/debug-hw.h
#define TEGRA_DBG_UART_BASE	NV_ADDRESS_MAP_UARTA_BASE   <== was UARTG_BASE
#define TEGRA_DBG_UART_CLK	tegra_clk_uarta             <== was uartg
#define TEGRA_DBG_UART_RST	tegra_rst_uarta             <== was uartg
#define TEGRA_DBG_UART_BAUD	115200

I use a USB to UART cable to connect to the board on what I know corresponds to /dev/ttyTHS0.
Yet, I don’t see any output.

is there any way to confirm that SPE is running and using uart0?
is it even possible to switch SPE to use uart0 for logging (i.e no UART0 interrupt processing needed on SPE)?

Thanks,
Alain

Hello,
To capture logs from different entities, you need not change anything.
Refer to How can I get the SPE debug message? - Jetson & Embedded Systems / Jetson Xavier NX - NVIDIA Developer Forums

br
ChenJian

I’m not using a devkit HW.
I can see /dev/ttyTCU0, but there is no mini or micro USB port on that HW. I’m checking with the vendor, but in the meantime, I’m trying to get SPE logging out, somehow.
switching to UART0 seemed feasible.
any reason why it wouldn’t work?

You mean you are using Xavier NX SOM + private carrier board?
You can take a look at Jetson_Xavier_NX_Product_Design_Guide_DG-09693-001_v1.2.pdf. Following information is stated:
Jetson Xavier NX supports UART for debugging purposes. The UART intended for debug is UART2 with is routed to a level shifter then to a 6-pin UART header on the Developer Kit Carrier Board.
Please connect the debug UART port.

All debug messages, from CCPLEX (Linux), SPE (FreeRTOS), etc., are output to that physical UART port. And you can use the demux tool mentioned above to get separate logs, or just a minicom to get all messages mixed.

br
ChenJian

I’m using a Floyd BB02 and debug UART is not working. it may not be connected, I’m in touch with the manufacturer.

While they debug on their side, I wanted try switching to a different UART.
I described in my earlier post what I did:

  • disabled /dev/ttyTHS0 on CCPLEX side
  • disabled combined UART on SPE code
  • switched from UARTG to UARTA (UART0)
    Any reason why this wouldn’t work?

Hello,
Debug UART is a basic debug method. Please contact vendor to wire out pins.

Some components, like BPMP, SCE, SPE, etc., output the debug information to fixed physical UART port.
If you are only interested in SPE log, you can take a look at SPE firmware code and change the code for log print. But it’s just a workaround, and we cannot support that.

br
ChenJian

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