This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: OpenCL on DSP breaks UART

Part Number: AM5728


Hello. We use AM5728 with ti-processor-sdk-linux-am57xx-evm-03.03.00.04 on custom board and have trouble with with /dev/ttyS0 and DSP.

Uart device tree part:

&dra7_pmx_core {

	uart1_pins_default: pinmux_uart1_pins_default {
		pinctrl-single,pins = <
			DRA7XX_CORE_IOPAD(0x37E0, PIN_INPUT_PULLUP | MUX_MODE0)		/* uart1_rxd */
			DRA7XX_CORE_IOPAD(0x37E4, PIN_OUTPUT_PULLUP | MUX_MODE0)	/* uart1_txd */
		>;
	};

	uart8_pins_default: pinmux_uart8_pins_default {
		pinctrl-single,pins = <
			DRA7XX_CORE_IOPAD(0x37D0, PIN_INPUT_PULLUP | MUX_MODE2)		/* uart8_rxd */
			DRA7XX_CORE_IOPAD(0x37D4, PIN_OUTPUT_PULLUP | MUX_MODE2)	/* uart8_txd */
		>;
	};
};

&uart1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins_default>;
};

&uart8 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&uart8_pins_default>;
};

When I try activate OpenCL on DSP uart1 tx breaks down, but rx works (I see input data with cat /dev/ttyS0 , but cannot see transmitted data on pin).

I.e. I run:

cat /dev/random >> /dev/ttyS0

And see random data on TX. It's OK.

But when I run some with OpenCL (example)

./vecadd_openmp

UART0 TX stay in 1 and no transmit new data.

If I restart "cat /dev/random >> /dev/ttyS0" It works up to new run opencl.

What I can do for get uart and dsp work?

  • The software team have been notified. They will respond here.
  • Make sure there is no software on the DSP that will touch or change the pin muxing. It is possible the software example is changing the mux settings.
  • On both DSP loaded dra7-dsp1-fw.xe66.opencl-monitor, dra7-dsp2-fw.xe66.opencl-monitor
    Now I checked it with ti-processor-sdk-linux-am57xx-evm-03.03.00.04/example-applications/opencl-examples-1.1.12.0/null example and error reproduced.
    I create 2 SSH connections to board:
    In first:
    root@am57xx-evm:~# cat /dev/random >> /dev/ttyS0

    After this I see random data via UART->USB adapter
    In second I run:
    root@am57xx-evm:~# ./null
    The OpenCL runtime will lazily load the device program upon the
    first enqueue of a kernel from the program, so the elapsed time
    overall from the first enqueue will be longer to account for the
    loading of the kernel. Also, subsequent enqueue's of a kernel will
    also potentially benefit from a warm cache on the device.

    Elapsed (with Load): 813 usecs
    Elapsed (w/o Load): 287 usecs
    Null Kernel Exec : Queue to Submit: 2 us
    Null Kernel Exec : Submit to Start : 87 us
    Null Kernel Exec : Start to End : 165 us

    Elapsed (w/o Load): 261 usecs
    Null Kernel Exec : Queue to Submit: 2 us
    Null Kernel Exec : Submit to Start : 68 us
    Null Kernel Exec : Start to End : 163 us

    Elapsed (w/o Load): 256 usecs
    Null Kernel Exec : Queue to Submit: 2 us
    Null Kernel Exec : Submit to Start : 61 us
    Null Kernel Exec : Start to End : 166 us

    Elapsed (w/o Load): 256 usecs
    Null Kernel Exec : Queue to Submit: 1 us
    Null Kernel Exec : Submit to Start : 63 us
    Null Kernel Exec : Start to End : 165 us

    Elapsed (w/o Load): 259 usecs
    Null Kernel Exec : Queue to Submit: 2 us
    Null Kernel Exec : Submit to Start : 73 us
    Null Kernel Exec : Start to End : 158 us

    Done!
    root@am57xx-evm:~#

    and from this moment UART no transmit new data.
  • also call "dsptop" leads to "cat /dev/random >> /dev/ttyS0" stop working (no new data on TX) up to restart "cat"
  • Konstantin,

    I am able to reproduce the UART halt issue when running OpenCL, suspect there is resource specifically EDMA region conflict between UART driver in ARM/Linux and OpenCL monitor in DSP/RTOS. Will update you if any resolution.

    Regards,
    Garrett