Read Tegra UART

During boot there are 4 TEGRA_UART devices registered. Without adding any new software how can I read from those UART devices?

If the device is not already in use, then quite often you can plug in a USB serial UART, look at the new device created by the USB end, and then run a serial console using the same settings to both devices…you’d be able to verify communications at those particular settings. Minicom is on most any Linux by default. Sometimes “echo > /dev/whateverTTYitIs” can be used for sending, or “tail -f /dev/whateverTTYitIs” will indicate receiving data.

NOTE: Most any FTDI chipset USB serial UART has had drivers installed by default for a long time. Other chipsets may require driver install.

I have an external DSP’s UART connected to the Tegra UART. Yes I can Connect an FDTI cable to the DSP device connected to the UART port and see the DSP is sending data on the UART port. I hoped I could monitor the UART from the Tegra since it is connected directly to it. This way I could monitor the DSP through SSH and not have to add extra jumpers to my device between the Tegra and DSP. We are using Embedded Linux on the Tegra3 and I was hoping there was a simple way to monitor that UART.

The “/dev/” file should be readable from a login to the Tegra. “tail -f” for example, or minicom. It seems you have data known as being sent to the UART from the outside data source (DSP) and want to see if anything shows up on that UART…typically the device special file would be the only access unless you build your own driver to handle the UART as a special case. What “/dev” file corresponds to the UART?

This is what I find in my dmesg log
[ 0.266042] serial8250.0: ttyS0 at MMIO 0x70006300 (irq = 122) is a Tegra
[ 0.896066] console [ttyS0] enabled
[ 4.735408] tegra_uart.0: ttyHS0 at MMIO 0x70006000 (irq = 68) is a TEGRA_UART
[ 4.879935] Registered UART port ttyHS0
[ 4.883919] tegra_uart.1: ttyHS1 at MMIO 0x70006040 (irq = 69) is a TEGRA_UART
[ 5.039930] Registered UART port ttyHS1
[ 5.043907] tegra_uart.2: ttyHS2 at MMIO 0x70006200 (irq = 78) is a TEGRA_UART
[ 5.199939] Registered UART port ttyHS2
[ 5.203913] tegra_uart.4: ttyHS4 at MMIO 0x70006400 (irq = 123) is a TEGRA_UART
[ 5.359932] Registered UART port ttyHS4

I am assuming one of those terminals is the connected UART. I did get minicom onto our system and tried each of the terminals but never saw data on any of the terminals but if I connect a Serial to USB converter I can see the data on my laptop through minicom using the same settings.

If one program works, but not another, typically it means the port settings were wrong on the one that didn’t work (if it’s just speed that is wrong, then often the data is garbage, but may still be blank; if flow control is software on one side and CTS/DTS on the other, then probably nothing will show up). I don’t know what to tell you for your case in terms of finding correct settings, but if minicom worked you might want to note how it was set; if cabling changes in any way (such as changing between having CTS/DTS wires or not) then this should be suspected.

One of the difficulties of figuring this out is that serial ports are not plug-n-play, so queries are what the driver is set to, but not necessarily what the actual serial port is working with (e.g., you can set a driver to a speed the UART does not support…the driver will not know this). This is one reason why an oscilloscope on the TX/RX lines just to see if there is traffic is useful (or a logic analyzer).

linuxdev, thanks for the feedback. I did check the minicom settings on both machines and they match on both systems. I’ve turned off flow control and set the speeds to be the same. I also have a oscilloscope on the traces and see the data transferring across the lines. I know I have the correct port (/dev/ttyHS4) because the key strokes I enter into the minicom termial show up on the oscilloscope Tx line while when I reboot the DSP I see the data on the Rx line. I’ve also verified the two ports are using the same digital levels to communicate. I’ll keep fiddling with the setting on the unit and see if I can get the data.

Thanks again for the feedback!