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.

AM3352: Problem with UART timing out on write

Part Number: AM3352


Tool/software:

Hi,

I have built a custom yocto image for my BBB and I'm having trouble with the UART. I have two uarts mapped ttyS1 and ttyS4. But for some reason I'm having trouble with ttyS1 timing out writing data, but only after the first string of data is sent.

The process is as follows: Write data -> Read response -> Write data -> Timeout Unknown Error

This does not occur with ttyS4. This also happens when there is nothing connected to the uart.

This exact same code works on the TI processor SDK linux image as well as raspbian. My question is how would I go about determining what is going wrong or debugging this? There is nothing in dmesg that gives me a hint. I have also added linux-ti-staging-6.12 kernel to my image thinking it might be a kernel issue, but this did not help either.

The program is a small QT (5.15.13) console program.

Any help would be greatly appreciated as I'm running out of ideas on what might cause this issue.

  • Hi TJ,

    Please share the kernel patch which you used to enable the 2 UART.

    Please also share the Linux boot log.

  • Hi Bin Liu,

    Thank you for your response. Below is the kernel boot log along with the device tree. I would like to note that uart 0 does work as the debug console.

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 6.12.17-00770-g1ac80adecb8e (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 PREEMPT Thu Mar 20 22:12:45 UTC 2025
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x Hello World
    [    0.000000] earlycon: omap8250 at MMIO 0x44e09000 (options '')
    [    0.000000] printk: legacy bootconsole [omap8250] enabled
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 64 MiB at 0x9b000000 on node -1
    [    0.000000] Zone ranges:
    [    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fdfffff]
    [    0.000000]   HighMem  empty
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fdfffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
    [    0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] Kernel command line: root=PARTUUID=c74f7ae3-02 rootwait rw earlycon console=ttyO0,115200n8,115200
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130560
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU event tracing is enabled.
    [    0.000000]  Trampoline variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
    [    0.000000] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
    [    0.000003] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.008065] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.018113] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
    [    0.029622] Console: colour dummy device 80x30
    [    0.034245] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.041022] This ensures that you still see kernel messages. Please
    [    0.047466] update your kernel commandline.
    [    0.051800] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [    0.094572] CPU: Testing write buffer coherency: ok
    [    0.099664] CPU0: Spectre v2: using BPIALL workaround
    [    0.104859] pid_max: default: 32768 minimum: 301
    [    0.109750] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.117279] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.168313] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.175281] rcu: Hierarchical SRCU implementation.
    [    0.180248] rcu:     Max phase no-delay instances is 1000.
    [    0.185998] EFI services will not be available.
    [    0.190782] Memory: 430952K/522240K available (12288K kernel code, 1551K rwdata, 3532K rodata, 1024K init, 295K bss, 24208K reserved, 65536K cma-reserved, 0K highmem)
    [    0.206595] devtmpfs: initialized
    [    0.223733] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.231997] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.242167] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
    [    0.254324] pinctrl core: initialized pinctrl subsystem
    [    0.261206] DMI not present or invalid.
    [    0.265797] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.275816] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.284543] thermal_sys: Registered thermal governor 'step_wise'
    [    0.284679] cpuidle: using governor menu
    [    0.310676] No ATAGs?
    [    0.313047] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.320017] Serial: AMBA PL011 UART driver
    [    0.341363] SCSI subsystem initialized
    [    0.358561] usbcore: registered new interface driver usbfs
    [    0.364243] usbcore: registered new interface driver hub
    [    0.378210] usbcore: registered new device driver usb
    [    0.383893] pps_core: LinuxPPS API ver. 1 registered
    [    0.398109] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.407528] PTP clock support registered
    [    0.428186] EDAC MC: Ver: 3.0.0
    [    0.431995] scmi_core: SCMI protocol bus registered
    [    0.450272] clocksource: Switched to clocksource dmtimer
    [    0.478719] NET: Registered PF_INET protocol family
    [    0.490590] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.510593] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.519304] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.540294] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
    [    0.548309] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.580319] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.586965] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    0.600287] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    0.607631] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.630823] RPC: Registered named UNIX socket transport module.
    [    0.636929] RPC: Registered udp transport module.
    [    0.650286] RPC: Registered tcp transport module.
    [    0.655128] RPC: Registered tcp-with-tls transport module.
    [    0.670282] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.676918] PCI: CLS 0 bytes, default 64
    [    0.691980] Initialise system trusted keyrings
    [    0.710387] workingset: timestamp_bits=30 max_order=17 bucket_order=0
    [    0.717458] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.730760] NFS: Registering the id_resolver key type
    [    0.736010] Key type id_resolver registered
    [    0.750282] Key type id_legacy registered
    [    0.754450] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    0.770285] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    0.790610] Key type asymmetric registered
    [    0.794834] Asymmetric key parser 'x509' registered
    [    0.799939] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.830323] io scheduler mq-deadline registered
    [    0.834991] io scheduler kyber registered
    [    0.850988] ledtrig-cpu: registered to indicate activity on CPUs
    [    0.977584] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
    [    0.993868] STMicroelectronics ASC driver initialized
    [    1.033590] brd: module loaded
    [    1.055542] loop: module loaded
    [    1.074290] CAN device driver interface
    [    1.078555] e1000e: Intel(R) PRO/1000 Network Driver
    [    1.090303] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [    1.096464] igb: Intel(R) Gigabit Ethernet Network Driver
    [    1.120279] igb: Copyright (c) 2007-2014 Intel Corporation.
    [    1.126812] pegasus: Pegasus/Pegasus II USB Ethernet driver
    [    1.140335] usbcore: registered new interface driver pegasus
    [    1.146192] usbcore: registered new interface driver asix
    [    1.170331] usbcore: registered new interface driver ax88179_178a
    [    1.176632] usbcore: registered new interface driver cdc_ether
    [    1.190312] usbcore: registered new interface driver smsc75xx
    [    1.196253] usbcore: registered new interface driver smsc95xx
    [    1.210310] usbcore: registered new interface driver net1080
    [    1.216167] usbcore: registered new interface driver cdc_subset
    [    1.240311] usbcore: registered new interface driver zaurus
    [    1.246085] usbcore: registered new interface driver cdc_ncm
    [    1.260892] usbcore: registered new interface driver usb-storage
    [    1.280797] i2c_dev: i2c /dev entries driver
    [    1.287994] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.311120] sdhci: Secure Digital Host Controller Interface driver
    [    1.317496] sdhci: Copyright(c) Pierre Ossman
    [    1.330561] Synopsys Designware Multimedia Card Interface Driver
    [    1.336897] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.351120] usbcore: registered new interface driver usbhid
    [    1.356860] usbhid: USB HID core driver
    [    1.372430] NET: Registered PF_INET6 protocol family
    [    1.391577] Segment Routing with IPv6
    [    1.395434] In-situ OAM (IOAM) with IPv6
    [    1.399555] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.421156] NET: Registered PF_PACKET protocol family
    [    1.426377] can: controller area network core
    [    1.440358] NET: Registered PF_CAN protocol family
    [    1.445296] can: raw protocol
    [    1.448351] can: broadcast manager protocol
    [    1.470298] can: netlink gateway - max_hops=1
    [    1.475168] Key type dns_resolver registered
    [    1.479821] ThumbEE CPU extension supported.
    [    1.490305] Registering SWP/SWPB emulation handler
    [    1.495652] omap_voltage_late_init: Voltage driver support not added
    [    1.542279] Loading compiled-in X.509 certificates
    [    1.617696] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    1.641189] ti-sysc 44e31000.target-module: probe with driver ti-sysc failed with error -16
    [    1.690401] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 18, base_baud = 3000000) is a 8250
    [    1.714181] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    [    1.732363] ti-sysc 48040000.target-module: probe with driver ti-sysc failed with error -16
    [    1.772796] OMAP GPIO hardware version 0.1
    [    1.811845] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 26, base_baud = 3000000) is a 8250
    [    1.852428] 48000000.interconnect:segment@200000:target-module@0:mpu@0:fck: device ID is greater than 24
    [    1.885279] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.891954] random: crng init done
    [    1.960308] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.968227] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    1.983293] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [    2.010909] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
    [    2.019621] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    2.040307] cpsw 4a100000.ethernet: ALE Table size 1024, Policers 0
    [    2.046893] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.070339] cpsw 4a100000.ethernet: Detected MACID = 88:0c:e0:16:96:9f
    [    2.088062] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
    [    2.120313] edma 49000000.dma: TI EDMA DMA engine driver
    [    2.192646] omap_reset_deassert: timedout waiting for gfx:0
    [    2.198490] ti-sysc 5600fe00.target-module: probe with driver ti-sysc failed with error -110
    [    2.222883] target-module@4b000000:target-module@140000:pmu@0:fck: device ID is greater than 24
    [    2.241999] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 (8000000f) counters available
    [    2.276351] l3-aon-clkctrl:0000:0: failed to disable
    [    2.284054] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 36, base_baud = 3000000) is a 8250
    [    2.300654] printk: legacy console [ttyS0] enabled
    [    2.300654] printk: legacy console [ttyS0] enabled
    [    2.320344] printk: legacy bootconsole [omap8250] disabled
    [    2.320344] printk: legacy bootconsole [omap8250] disabled
    [    2.380566] tps65910 0-002d: No interrupt support, no core IRQ
    [    2.401786] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    2.411794] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    2.435199] sdhci-omap 481d8000.mmc: supply pbias not found, using dummy regulator
    [    2.445040] sdhci-omap 48060000.mmc: Got CD GPIO
    [    2.450169] sdhci-omap 48060000.mmc: supply pbias not found, using dummy regulator
    [    2.461604] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
    [    2.481517] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
    [    2.512735] sdhci-omap 481d8000.mmc: supply pbias not found, using dummy regulator
    [    2.530809] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
    [    2.541848] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    2.561752] sdhci-omap 48060000.mmc: Got CD GPIO
    [    2.566672] sdhci-omap 48060000.mmc: supply pbias not found, using dummy regulator
    [    2.590804] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
    [    2.598484] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
    [    2.636656] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [    2.648905] mmc1: new high speed MMC card at address 0001
    [    2.655521] mmcblk1: mmc1:0001 MT3204 3.56 GiB
    [    2.666835] mmcblk1boot0: mmc1:0001 MT3204 2.00 MiB
    [    2.673593] mmcblk1boot1: mmc1:0001 MT3204 2.00 MiB
    [    2.691303] mmcblk1rpmb: mmc1:0001 MT3204 512 KiB, chardev (243:0)
    [    2.706131] mmc0: new high speed SDHC card at address 0001
    [    2.712580] mmcblk0: mmc0:0001 USD 14.9 GiB
    [    2.721960]  mmcblk0: p1 p2
    [    2.826167] clk: Disabling unused clocks
    [    2.830501] PM: genpd: Disabling unused power domains
    [    3.047544] EXT4-fs (mmcblk0p2): recovery complete
    [    3.054216] EXT4-fs (mmcblk0p2): mounted filesystem bda1cc67-9f72-418e-827f-5fcd93976817 r/w with ordered data mode. Quota mode: disabled.
    [    3.066965] VFS: Mounted root (ext4 filesystem) on device 179:50.
    [    3.075510] devtmpfs: mounted
    [    3.080010] Freeing unused kernel image (initmem) memory: 1024K
    [    3.086612] Run /sbin/init as init process
    [    3.575944] systemd[1]: System time before build time, advancing clock.
    [    3.655535] systemd[1]: systemd 255.17^ running in system mode (-PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK -SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -TPM2 -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
    [    3.687916] systemd[1]: Detected architecture arm.
    
    Welcome to Poky (Yocto Project Reference Distro) 5.0.8 (scarthgap)!
    
    [    3.729967] systemd[1]: Hostname set to <beaglebone>.
    [    4.944123] systemd[1]: Queued start job for default target Multi-User System.
    [    4.981489] systemd[1]: Created slice Slice /system/getty.
    [  OK  ] Created slice Slice /system/getty.
    [    5.012892] systemd[1]: Created slice Slice /system/modprobe.
    [  OK  ] Created slice Slice /system/modprobe.
    [    5.046598] systemd[1]: Created slice Slice /system/serial-getty.
    [  OK  ] Created slice Slice /system/serial-getty.
    [    5.073235] systemd[1]: Created slice Slice /system/serial-getty115200.
    [  OK  ] Created slice Slice /system/serial-getty115200.
    [    5.103947] systemd[1]: Created slice Slice /system/serial-getty115200:ttyAMA0.
    [  OK  ] Created slice Slice /system/serial-getty115200:ttyAMA0.
    [    5.133537] systemd[1]: Created slice Slice /system/serial-getty115200:ttyS0.
    [  OK  ] Created slice Slice /system/serial-getty115200:ttyS0.
    [    5.164342] systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    [    5.191408] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [    5.221425] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [    5.251399] systemd[1]: Reached target Path Units.
    [  OK  ] Reached target Path Units.
    [    5.280939] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    5.310826] systemd[1]: Reached target Slice Units.
    [  OK  ] Reached target Slice Units.
    [    5.341488] systemd[1]: Reached target Swaps.
    [  OK  ] Reached target Swaps.
    [    5.374509] systemd[1]: Listening on Syslog Socket.
    [  OK  ] Listening on Syslog Socket.
    [    5.403097] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [    5.444920] systemd[1]: Journal Audit Socket was skipped because of an unmet condition check (ConditionSecurity=audit).
    [    5.458148] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    5.492022] systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [    5.522887] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    5.553068] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    5.583797] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    5.612255] systemd[1]: Listening on User Database Manager Socket.
    [  OK  ] Listening on User Database Manager Socket.
    [    5.641924] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
    [    5.656151] systemd[1]: POSIX Message Queue File System was skipped because of an unmet condition check (ConditionPathExists=/proc/sys/fs/mqueue).
    [    5.701372] systemd[1]: Mounting Kernel Debug File System...
             Mounting Kernel Debug File System...
    [    5.784696] systemd[1]: Mounting Kernel Trace File System...
             Mounting Kernel Trace File System...
    [    5.881069] systemd[1]: Mounting Temporary Directory /tmp...
             Mounting Temporary Directory /tmp...
    [    5.951513] systemd[1]: Starting Create List of Static Device Nodes...
             Starting Create List of Static Device Nodes...
    [    5.991998] systemd[1]: Starting Load Kernel Module configfs...
             Starting Load Kernel Module configfs...
    [    6.051720] systemd[1]: Starting Load Kernel Module drm...
             Starting Load Kernel Module drm...
    [    6.091852] systemd[1]: Starting Load Kernel Module fuse...
             Starting Load Kernel Module fuse...
    [    6.121569] systemd[1]: File System Check on Root Device was skipped because of an unmet condition check (ConditionPathIsReadWrite=!/).
    [    6.152736] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
    [    6.176813] systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
    [    6.214685] systemd[1]: Starting Journal Service...
             Starting Journal Service...
    [    6.258737] systemd[1]: Load Kernel Modules was skipped because no trigger condition checks were met.
    [    6.313319] systemd[1]: Starting Generate network units from Kernel command line...
             Starting Generate network units from Kernel command line...
    [    6.408806] systemd-journald[82]: Collecting audit messages is disabled.
    [    6.417101] systemd[1]: Starting Remount Root and Kernel File Systems...
             Starting Remount Root and Kernel File Systems...
    [    6.514402] systemd[1]: Starting Apply Kernel Variables...
             Starting Apply Kernel Variables...
    [    6.621744] systemd[1]: Starting Coldplug All udev Devices...
             Starting Coldplug All udev Devices...
    [    6.705155] EXT4-fs (mmcblk0p2): re-mounted bda1cc67-9f72-418e-827f-5fcd93976817 r/w. Quota mode: disabled.
    [    6.722641] systemd[1]: Mounted Kernel Debug File System.
    [  OK  ] Mounted Kernel Debug File System.
    [    6.775466] systemd[1]: Mounted Kernel Trace File System.
    [  OK  ] Mounted Kernel Trace File System.
    [    6.832523] systemd[1]: Mounted Temporary Directory /tmp.
    [  OK  ] Mounted Temporary Directory /tmp.
    [    6.871989] systemd[1]: Started Journal Service.
    [  OK  ] Started Journal Service.
    [  OK  ] Finished Create List of Static Device Nodes.
    [  OK  ] Finished Load Kernel Module configfs.
    [  OK  ] Finished Load Kernel Module drm.
    [  OK  ] Finished Load Kernel Module fuse.
    [  OK  ] Finished Generate network units from Kernel command line.
    [  OK  ] Finished Remount Root and Kernel File Systems.
    [  OK  ] Finished Apply Kernel Variables.
    [  OK  ] Reached target Preparation for Network.
             Mounting Kernel Configuration File System...
             Starting Flush Journal to Persistent Storage...
             Starting Create Static Device Nodes in /dev gracefully...
    [  OK  ] Mounted Kernel Configuration File System.
    [    7.466034] systemd-journald[82]: Received client request to flush runtime journal.
    [  OK  ] Finished Flush Journal to Persistent Storage.
    [  OK  ] Finished Create Static Device Nodes in /dev gracefully.
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Finished Create Static Device Nodes in /dev.
    [  OK  ] Reached target Preparation for Local File Systems.
             Mounting /var/volatile...
             Starting Rule-based Manager for Device Events and Files...
    [  OK  ] Mounted /var/volatile.
             Starting Load/Save OS Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Create System Files and Directories...
    [  OK  ] Finished Load/Save OS Random Seed.
    [  OK  ] Started Rule-based Manager for Device Events and Files.
             Starting Network Configuration...
    [  OK  ] Finished Create System Files and Directories.
             Starting Network Name Resolution...
             Starting Network Time Synchronization...
             Starting Record System Boot/Shutdown in UTMP...
             Starting User Database Manager...
    [  OK  ] Finished Record System Boot/Shutdown in UTMP.
    [  OK  ] Started User Database Manager.
    [   10.181632] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target Host and Network Name Lookups.
    [  OK  ] Reached target System Time Set.
    [   10.440175] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [   10.462993] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
    [   10.481666] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
    [   10.508866] cfg80211: failed to load regulatory.db
    [  OK  ] Started Network Configuration.
    [  OK  ] Reached target Network.
    [  OK  ] Finished Coldplug All udev Devices.
    [   12.061348] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
    [   12.174516] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [   12.244001] libphy: PHY  not found
    [   12.288142] cpsw 4a100000.ethernet: phy "" not found on slave 1, err -19
    [   14.352921] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [   15.675531] am335x-phy-driver 47401300.usb-phy: dummy supplies not allowed for exclusive requests (id=vbus)
    [   15.871147] omap_rtc 44e3e000.rtc: registered as rtc0
    [   15.924605] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   15.938961] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
    [   15.954157] tps65910-rtc tps65910-rtc: registered as rtc1
    [   15.966795] am335x-phy-driver 47401b00.usb-phy: dummy supplies not allowed for exclusive requests (id=vbus)
    [   15.983041] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [   15.988447] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [   16.073855] systemd-journald[82]: Time jumped backwards, rotating.
    [   16.190696] hub 1-0:1.0: USB hub found
    [   16.230957] hub 1-0:1.0: 1 port detected
    [   16.315316] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [   16.413134] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [   16.496834] hub 2-0:1.0: USB hub found
    [   16.550559] hub 2-0:1.0: 1 port detected
    [  OK  ] Reached target Hardware activated USB gadget.
             Starting Virtual Console Setup...
    [  OK  ] Finished Virtual Console Setup.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timer Units.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
             Starting sshd.socket...
    [  OK  ] Listening on sshd.socket.
    [  OK  ] Reached target Socket Units.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started Kernel Logging Service.
    [  OK  ] Started System Logging Service.
             Starting D-Bus System Message Bus...
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Network Time Service.
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Reached target Login Prompts.
             Starting User Login Management...
             Starting OpenSSH Key Generation...
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Started User Login Management.
    [  OK  ] Reached target Multi-User System.
             Starting Record Runlevel Change in UTMP...
    [  OK  ] Finished Record Runlevel Change in UTMP.
    [  OK  ] Finished OpenSSH Key Generation.
    
    Poky (Yocto Project Reference Distro) 5.0.8 beaglebone ttyS0
    
    beaglebone login:
    

    	uart0_pins_default: uart0-default-pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x970, PIN_INPUT | MUX_MODE0) /* (E15) uart0_rxd.uart0_rxd */
    			AM33XX_IOPAD(0x974, PIN_OUTPUT | MUX_MODE0) /* (E16) uart0_txd.uart0_txd */
    		>;
    	};
    	
    	uart1_pins_default: uart1-default-pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */
    			AM33XX_IOPAD(0x984, PIN_OUTPUT | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */
    		>;
    	};
    	
    	uart4_pins_default: uart4-default-pins {
    		pinctrl-single,pins = <
    			AM33XX_IOPAD(0x870, PIN_INPUT | MUX_MODE6) /* (T17) gpmc_wait0.uart4_rxd */
    			AM33XX_IOPAD(0x874, PIN_OUTPUT | MUX_MODE6) /* (U17) gpmc_wpn.uart4_txd */
    		>;
    	};
    	
    &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_default>;
    
        status = "okay";
    };
    
    &uart1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart1_pins_default>;
    
    	status = "okay";
    };
    
    &uart4 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart4_pins_default>;
    
    	status = "okay";
    };

  • Here is also output of my sample serial program. Its just this sample with a different main: https://code.qt.io/cgit/qt/qtserialport.git/tree/examples/serialport/cwriterasync/serialportwriter.cpp?h=5.15

    Main:

    int main(int argc, char *argv[])
    {
        QCoreApplication coreApplication(argc, argv);
    
        QSerialPort serialPort;
        // serialPort.setPortName("ttyS1");
        serialPort.setPortName("ttyS4");
        serialPort.setBaudRate(9600);
    
        if (serialPort.open(QIODevice::ReadWrite))
            qDebug() << "Opened serial port";
        else
            qDebug() << "Failed to open serial port";
    
        QByteArray data = QByteArrayLiteral("\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0");
    
        SerialPortWriter serialPortWriter(&serialPort);
        serialPortWriter.write(data);
    
        return coreApplication.exec();
    }

    And here is the output running it on ttyS1 and ttyS4. As you can see it seems like once data is sent everything stops working. I also need to ctrl+c the program on ttyS1 where on ttyS4 it exits as it should.

    Data successfully sent to port ttyS4
    root@beaglebone:~# ./serial-tester-ttyS4
    Opened serial port
    Data successfully sent to port ttyS4
    root@beaglebone:~# ./serial-tester-ttyS4
    Opened serial port
    Data successfully sent to port ttyS4
    root@beaglebone:~# ./serial-tester-ttyS4
    Opened serial port
    Data successfully sent to port ttyS4
    
    root@beaglebone:~# ./serial-tester-ttyS1
    Opened serial port
    Data successfully sent to port ttyS1
    ^C
    root@beaglebone:~# ./serial-tester-ttyS1
    Opened serial port
    Operation timed out for port ttyS1, error: Unknown error
    ^C
    root@beaglebone:~# ./serial-tester-ttyS1
    Opened serial port
    Operation timed out for port ttyS1, error: Unknown error
    root@beaglebone:~# ^C

  • Hi TJ,

    The kernel boot log doesn't have any obvious problem in uart, your devicetree change is very similar to what I did back in kernel 4.19. The only difference is that I had _PULLUP/_PULLDOWN set in the pinmux, but I don't think it matters.

    Instead of your Qt test program, can you please run the following simple test multiple test to see if it has issues too?

    # stty -F /dev/ttyS1 -echo 9600
    # echo "whatever-string-you-want" > /dev/ttyS1

  • Hi Bin Liu,

    I have run these commands and they succeed every time. But echo ttyS1 takes 30s to return. I have run a small pure C program to send data over uart, and that one seems to be successful and working. But closing the file handle it takes 30s to close it. This does not occur on ttyS4. I will keep testing a bit with just C and report back

  • I have connected my logic analyzer to see if I can find anything there. When I run the echo command I can see the data. But as soon as its done, for the 30s that the echo command takes to close it repeatedly send \0. Note that this does not happen as long as I keep the data short to 3 bytes or less, then everything seems to be working as it should.

    echo "te" > /dev/ttyS1

    echo "test" < /dev/ttyS1

  • Hi Bin Liu,

    I have not found a solution yet, But I did add an older TI kernel (linux_ti_stating_6.1) and all the issues with ttyS1 has been solved. I will try adding some newer kernels and see if I can determine where this issue comes in.

  • Hi TJ,

    Thanks for the update that the issue doesn't happen in kernel v6.1.

    The latest version of TI Processor SDK supporting AM335x is SDKv9.3.5.2, which uses kernel v6.1. We haven't validated any newer version of the kernel on AM335x yet.