牛牛牛 发表于 2025-8-6 17:48:35

yy3568 开发板的串口输入不好使

你好,我刚买的的yy3568 开发板,串口输入不了内容,输出可以正常打印(但当插上rx的线,tx也开始打印乱码),我怀疑是此串口的rx硬件有问题导致的,请您给一个解决方法。

我目前采取的调试方法如下,但都不解决问题:1. 在dts的rk3568.dtsi上交换uart2、3的定义,仍然在uart2打印,且会在kernel启动过程中卡死(怀疑是串口配置导致不再打印了)2. 更改pinctrl.dtsi的pin定义,uart2、3交换,没有作用,仍然在uart2打印,并且正常启动。

                serial2 = &uart2;
                serial3 = &uart3;

风火轮用户eqibq 发表于 2025-8-7 14:19:44

麻烦上传一下主串口和USB转串口模组以及主机连接图片以及输出现象,谢谢

牛牛牛 发表于 2025-8-10 22:01:01

串口连接线如图所示,核电脑端就是usb连接。

TXD不连接时,可以正常打印,TXD连上后就打印乱码了。切换到uart3后的打印如下:

正常打印:

mount: /oem: wrong fs type, bad option, bad superblock on /dev/mmcblk0p8, missing codepage or helper program, or other error.
[    1.708077] EXT4-fs (mmcblk0p9): VFS: Can't find ext4 filesystem
mount: /userdata: wrong fs type, bad option, bad superblock on /dev/mmcblk0p9, missing codepage or helper program, or other error.
Starting syslogd: OK
Starting klogd: OK
[    1.800771] mmc3 mmc_send_io_op_cond err: -110
Running sysctl: OK
Populating /dev using udev: [    1.874631] udevd: starting version 3.2.10
[    1.889444] udevd: starting eudev-3.2.10
done
Saving random seed: OK
Will now mount all partitions in /etc/fstab
Note: Will skip fsck, remove /.skip_fsck to enable
Handling /dev/root / ext4 rw,noauto 1
/bin/disk-helper: line 328: findmnt: command not found
Resizing /dev/mmcblk0p7(ext4)
resize2fs 1.46.5 (30-Dec-2021)
[    2.424787] EXT4-fs (mmcblk0p7): resizing filesystem from 25645 to 1572864 blocks
[    2.471605] EXT4-fs (mmcblk0p7): resized filesystem to 1572864
Filesystem at /dev/mmcblk0p7 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p7 is now 1572864 (4k) blocks long.

Handling tmpfs /tmp tmpfs mode=1777 0
Handling tmpfs /run tmpfs mode=0755,nosuid,nodev 0
Handling proc /proc proc defaults 0
Handling devtmpfs /dev devtmpfs defaults 0
Handling devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0
Handling tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0
Handling sysfs /sys sysfs defaults 0
Handling configfs /sys/kernel/config configfs defaults 0
Handling debugfs /sys/kernel/debug debugfs defaults 0
Handling pstore /sys/fs/pstore pstore defaults 0
Handling /dev/block/by-name/oem /oem ext2 defaults 2
Mounting /dev/mmcblk0p8(ext2) on /oem with -o defaults
[    2.911526] FAT-fs (mmcblk0p8): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
mount: /oem: wrong fs type, bad option, bad superblock on /dev/mmcblk0p8, missing codepage or helper program, or other error.
Handling /dev/block/by-name/userdata /userdata ext2 defaults 2
Mounting /dev/mmcblk0p9(ext2) on /userdata with -o defaults
[    3.013185] FAT-fs (mmcblk0p9): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
mount: /userdata: wrong fs type, bad option, bad superblock on /dev/mmcblk0p9, missing codepage or helper program, or other error.
Log saved to /tmp/mount-all.log
starting bootanim... Starting bootanim: 437...
Starting hook: /etc/bootanim.d/gst-bootanim.sh...
done.
Starting network: OK
Starting /usr/bin/usbdevice start, log saved to /tmp/usbdevice.log
[    3.531782] file system registered
[    3.590654] read descriptors
[    3.590728] read strings
[    3.657843] dwc3 fcc00000.dwc3: failed to enable ep0out
Starting input-event-daemon:   /bin/list-iodomain.sh version: V1.0.1
done
    install io command first!!!
root@rk356x:/#





当按前面所述切换为UART3时,uart2上的打印会卡住的位置:
[    0.003825] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.004472] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.006449] ASID allocator initialised with 32768 entries
[    0.007075] rcu: Hierarchical SRCU implementation.
[    0.009547] Platform MSI: interrupt-controller@fd440000 domain created
[    0.010546] PCI/MSI: /interrupt-controller@fd400000/interrupt-controller@fd440000 domain created
[    0.012179] smp: Bringing up secondary CPUs ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
[    0.013862] Detected VIPT I-cache on CPU1
[    0.013894] GICv3: CPU1: found redistributor 100 region 0:0x00000000fd480000
[    0.013936] CPU1: using LPI pending table @0x0000000008380000
[    0.013984] CPU1: Booted secondary processor 0x0000000100
[    0.015313] Detected VIPT I-cache on CPU2
[    0.015339] GICv3: CPU2: found redistributor 200 region 0:0x00000000fd4a0000
[    0.015375] CPU2: using LPI pending table @0x0000000008390000
[    0.015411] CPU2: Booted secondary processor 0x0000000200
[    0.015512] smp: Brought up 1 node, 3 CPUs
[    0.020292] SMP: Total of 3 processors activated.
[    0.020738] CPU features: detected: GIC system register CPU interface
[    0.021345] CPU features: detected: Privileged Access Never
[    0.021869] CPU features: detected: LSE atomic instructions
[    0.022408] CPU features: detected: User Access Override
[    0.022910] CPU features: detected: 32-bit EL0 Support
[    0.023395] CPU features: detected: RAS Extension Support
[    0.024022] CPU: All CPU(s) started at EL2
[    0.024427] alternatives: patching kernel code
[    0.029641] devtmpfs: initialized
[    0.050003] Registered cp15_barrier emulation handler
[    0.050494] Registered setend emulation handler
[    0.051159] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.052085] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.053313] pinctrl core: initialized pinctrl subsystem
[    0.054625] NET: Registered protocol family 16
[    0.058160] cpuidle: using governor menu
[    0.058552] Registered FIQ tty driver
[    0.059298] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.060884] DMA: preallocated 256 KiB pool for atomic allocations
[    0.064212] ramoops: dmesg-0 0x20000@0x0000000000110000
[    0.065829] ramoops: console 0x80000@0x0000000000130000
[    0.066342] ramoops: pmsg    0x50000@0x00000000001b0000
[    0.067145] console enabled
[    0.067501] pstore: Registered ramoops as persistent store backend
[    0.068085] ramoops: attached 0xf0000@0x110000, ecc: 0/0
[    0.090032] platform 7c00000.rpmsg: assigned reserved memory node rpmsg-dma@8000000
[    0.097822] rockchip-gpio fdd60000.gpio: probed gpio0 (fdd60000.gpio)
[    0.098968] rockchip-gpio fe740000.gpio: probed gpio1 (fe740000.gpio)
[    0.100045] rockchip-gpio fe750000.gpio: probed gpio2 (fe750000.gpio)
[    0.101125] rockchip-gpio fe760000.gpio: probed gpio3 (fe760000.gpio)
[    0.102227] rockchip-gpio fe770000.gpio: probed gpio4 (fe770000.gpio)
[    0.102917] rockchip-pinctrl pinctrl: probed pinctrl
[    0.113739] cryptd: max_cpu_qlen set to 1000
[    0.115615] console enabled
[    0.116003] bootconsole disabled
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot


何浩钧 发表于 2025-8-14 14:45:16

1.硬件电平是否正常?
2.不要随意交换uart2和uart3,uart2是debug调试串口。
3.具体是哪个串口无法输入,请描述清楚(附上图文),是使用usb 装ttl 还是直连,请描述。
4.怀疑串口的rx硬件有问题的原因是什么?
页: [1]
查看完整版本: yy3568 开发板的串口输入不好使