主题中讨论的其他器件:AM62P
工具与软件:
我创建了一个 mcu_uart0节点、如下所示
但当我尝试使用此命令 root@am62pxx-evm:~# while [ 1 ];do echo 128391023819203890123 >/dev/ttyS1;sleep 1;done、它不会 发送任何内容。 为了完成这项工作、我还需要做什么?
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.
工具与软件:
我创建了一个 mcu_uart0节点、如下所示
但当我尝试使用此命令 root@am62pxx-evm:~# while [ 1 ];do echo 128391023819203890123 >/dev/ttyS1;sleep 1;done、它不会 发送任何内容。 为了完成这项工作、我还需要做什么?
您好、Sergio、
interrupts-extended = <&gic500 GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
<&mcu_pmx0 0x0014>; /* (B6) MCU_UART0_RXD */
interrupt-names = "irq", "wakeup";
请从&MCU_Uart0节点中删除这些"interrupt*"属性、以查看 MCU_UART0 TX 是否仍然无法传输?
您好、Sergio、
不需要任何东西、UART 驱动程序位于内核映像中。
请仔细检查是否探测的引脚正确、TX 是 J11接头中的引脚19。
我在 SK-AM62P 板上测试了 MCU uart0外部环回、未发现任何问题。
这是内核 dts 补丁。
diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
index 1b537c84b7da..a6506b64a4d5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
@@ -20,6 +20,7 @@ / {
aliases {
serial0 = &wkup_uart0;
+ serial1 = &mcu_uart0;
serial2 = &main_uart0;
serial3 = &main_uart1;
mmc0 = &sdhci0;
@@ -839,6 +840,18 @@ AM62PX_MCU_IOPAD(0x050, PIN_INPUT, 0) /* (C11) WKUP_I2C0_SDA */
>;
};
+ mcu_uart0_pins_default: mcu_uart0-default-pins {
+ pinctrl-single,pins = <
+ AM62PX_MCU_IOPAD(0x0014, PIN_INPUT, 0) /* (B6) MCU_UART0_RXD */
+ AM62PX_MCU_IOPAD(0x0018, PIN_OUTPUT, 0) /* (C8) MCU_UART0_TXD */
+ >;
+ };
+};
+
+&mcu_uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcu_uart0_pins_default>;
+ status = "okay";
};
&wkup_uart0 {
这是 EVM 上的测试日志:
am62px-evm login: root Last login: Thu Jan 1 00:00:31 UTC 1970 on ttyS2 root@am62px-evm:~# dmesg|grep tty [ 0.000000] Kernel command line: console=ttyS2,115200n8 root=/dev/nfs nfsroot=10.0.0.110:/home/lb/opt/filesys.am62x,nolock,v3 rw ip=10.0.0.162:::::eth 0 audit=off earlycon=ns16550a,mmio32,0x02800000 [ 1.243130] 4a00000.serial: ttyS1 at MMIO 0x4a00000 (irq = 251, base_baud = 3000000) is a 8250 [ 1.253377] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 252, base_baud = 3000000) is a 8250 [ 1.262252] printk: console [ttyS2] enabled [ 7.010125] systemd[1]: Created slice Slice /system/getty. [ 7.058729] systemd[1]: Created slice Slice /system/serial-getty. root@am62px-evm:~# stty -F /dev/ttyS1 -echo 115200 root@am62px-evm:~# cat /dev/ttyS1 & [1] 668 root@am62px-evm:~# echo asdfdg > /dev/ttyS1 root@am62px-evm:~# asdfdg root@am62px-evm:~#
您好、Bin Liu
我仔细检查了我的代码中您注释的节点、它们与您的节点相同。
我运行了与您相同的命令、这里是我的输出
root@am62pxx-evm:~# dmesg|grep tty [ 0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=PARTUUID=076c4a2a-02 rw rootfstype=ext4 rootwait [ 1.738621] 4a00000.serial: ttyS1 at MMIO 0x4a00000 (irq = 252, base_baud = 3000000) is a 8250 [ 1.750483] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 253, base_baud = 3000000) is a 8250 [ 1.759374] printk: console [ttyS2] enabled [ 1.789267] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 255, base_baud = 3000000) is a 8250 [ 1.798027] serial serial0: tty port ttyS3 registered [ 4.896322] systemd[1]: Created slice Slice /system/getty. [ 4.945118] systemd[1]: Created slice Slice /system/serial-getty. [ 5.039127] systemd[1]: Expecting device /dev/ttyS2... [ 12.609871] audit: type=1006 audit(19.512:19): pid=903 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=3 res=1 [ 12.622520] audit: type=1300 audit(19.512:19): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffdd98f118 a2=4 a3=1 items=0 ppid=1 pid=903 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty7 ses=3 comm="(weston)" exe="/usr/lib/systemd/systemd-executor" key=(null) root@am62pxx-evm:~# stty -F /dev/ttyS1 -echo 115200 root@am62pxx-evm:~# cat /dev/ttyS1 & [1] 1031 root@am62pxx-evm:~# echo asdfdg > /dev/ttyS1 root@am62pxx-evm:~#
此致
刘斌、您好!
是的、我的跳线 J13短接。 我进行了前面提到的环回测试。
我已经对示波器进行了如下其他测试。
1°-我已经在 RX 上连接了一个信号并尝试使用"cat /dev/ttyS1 "来读取它。当我用示波器测量存在的信号时、我的引脚13上有一个信号、但是我的 EVM 没有收到任何消息。
2°-我尝试在 TX 上使用"while [ 1 ];do echo 128391023819203890123 >/dev/ttyS1;sleep 1;done"发送信号、并将示波器放在引脚19上、但那里没有任何信号。
您好!
是的,在第一个测试,我已经配置我的 ttyS1用"stty -F /dev/ttyS1 19200 cs8 -cstobb -插入"和没有任何增加的计数
root@am62pxx-evm:~ grep 8250 /proc/tty/driver/serial
1:UART:8250 MMIO:0x04A00000 IRQ:252 TX:0 Rx:0 DSR
2:UART:8250 MMIO:0x02800000 IRQ:253 TX:16113 Rx:0 RTS|DTR|DSR
3:UART:8250 MMIO:0x02810000 IRQ:255 TX:4 Rx:1610
当我在 echo 命令运行时观察到计数时、它会出现
root@am62pxx-evm:~ grep 8250 /proc/tty/driver/serial
1:UART:8250 MMIO:0x04A00000 IRQ:252 TX:0 Rx:0 RTS|DTR|DSR
2:UART:8250 MMIO:0x02800000 IRQ:253 TX:16113 Rx:0 RTS|DTR|DSR
3:UART:8250 MMIO:0x02810000 IRQ:255 TX:4 Rx:1610
RTS|DTR|DSR 是运行命令时的唯一区别
root@am62pxx-evm:~ ls -l /lib/firmware
共计25168
-rw-r--r-- 1根根 2040三月 9 2018 license.ibt_firmware
-rw-r--r-- 1根根 2046三月 9 2018 license.iwlwifi_firmware
lrwxrwxrwx 1根根目录 73三月 9 2018 am62p-mcu-r5f0_0-fw ->/usr/lib/firmware/ti-ipc/am62pxx/ipc_echo_test_mcu2_0_release_strip.xer5f
lrwxrwxrwx 1根根目录 80 2018年3月9日 am62p-mcu-r5f0_0-fw-sec ->/usr/lib/firmware/ti-ipc/am62pxx/ipc_echo_test_mcu2_0_release_strip.xer5f.signed
-rw-r--r-- 1根 478544三月 9 2018 bl32.bin
-rw-r--r-- 1根根4420200三月 9 2018 bl32.elf
drwxr-xr-x 2根根 4096 Mar 9 2018 CNM
drwxr-xr-x 2根 root 4096 Mar 9 2018 Intel
-rw-r--r-- 1根 918268三月 9 2018 iwlwifi-3160-17.ucode.
-rw-r--r-- 1根根2448976 2018年3月9日 iwlwifi-8000C-34.ucode.
-rw-r--r-- 1根根2428004 2018年3月9日 iwlwifi-8000C-36.ucode.
-rw-r--r-- 1根2440780 2018年3月9日 iwlwifi-8265-34.ucode.
-rw-r--r-- 1根根2436632三月 9 2018 iwlwifi-8265-36.ucode.
-rw-r--r-- 1根根2678092三月 9 2018 iwlwifi-9260-j0-b0-b0-34.ucode. th
-rw-r--r-- 1根根2521412 2018年3月9日 iwlwifi-9260-jf-b0-b0-b0-38.ucode th
-rw-r--r-- 1根根1490508 2018年3月9日 iwlwifi-9260-jf-b0-b0-b0-46.ucode th
drwxr-xr-x 2 root root 4096 Mar 9 2018 mrvl
drwxr-xr-x 2根 root 4096 Mar 9 2018 Nxp
-rw-r--r-- 1根 4936三月 9 2018 regulation.db
-rw-r--r-- 1根根 1085 Mar 9 2018 regulation.db.p7s.
-rw-r--r-- 1根根 143360三月 9 2018 rgx.fw.36.53.104.796
-rw-r--r-- 1根 383128 Mar 9 2018 rgx.sh.36.53.104.796
-rw-r--r-- 1根根目录 2018年3月28日 tee-header_v2.bin
-rw-r--r-- 1根根目录 2018年3月9日 tee-pageable_v2.bin
-rw-r--r-- 1根 478544三月 9 2018 tee-pager_v2.bin
-rw-r--r-- 1根 478544三月 9 2018 tee-raw.bin
-rw-r--r-- 1根 478572 2018年3月9日 tee.bin
-rw-r--r-- 1根根4420200 2018年3月9日 tee.elf
drwxr-xr-x 2根 root 4096 Mar 9 2018 ti-connectivity
drwxr-xr-x 3根根 4096 Mar 9 2018 ti-ipc
lrwxrwxrwx 1根根目录 2018年3月9日46日 wave521c_k3_codec_fw.bin ->/usr/lib/firmware/cnm/wave521c_k3_codec_fw.bin