Hope someone can help me. I am trying to make serial port communications in ARM (I work with Linux). The fact is that I use a program called terminal in windows, which I use to view the output.
I have two cables connected from my ARM to the USB of my computer. What I do is open two windows of the terminal program, and I connect to the mail serial port until everything is fine.
Now in one of the windows I have an ARM console (this is the ttymxc1 serial port) in which I write, for example, "echo hello> / dev / ttymxc2" (ttymxc2 is a different port in other windows). When I executed it, there was doubt, a decrease like this: "<0> <0 <0 <0 <0 <0 <0>". I read, and I found out that this is usually a baud rate problem, so I change the baud rate of "ttymxc2" to 115200 as "ttymxc1" at the same speed. As soon as I did this and I tried to send the same echo again, you will see the following: <0> © :: * ë & lt 0, so somenthig has changed.
I get all the parameters of both serial ports, and this is the output:
stty -a -F /dev/ttymxc1
speed 115200 baud;stty: /dev/ttymxc1
line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ^J;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl echoke
stty -F /dev/ttymxc2 115200
stty -a -F /dev/ttymxc2
speed 115200 baud;stty: /dev/ttymxc2
line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
, , 115200 8n1 no Handshaking .
,
setserial /dev/ttymxc2 -v autoconfig
/dev/ttymxc2, UART: undefined, Port: 0x0000, IRQ: 60
setserial /dev/ttymxc0 -v autoconfig
/dev/ttymxc0, UART: undefined, Port: 0x0000, IRQ: 58
, , , somenthing :
setserial /dev/ttymxc2 uart 16550A
:
setserial: can't set serial info: Invalid argument
, , ttymxc1 undefined, , ARM , , somen .
, .
dmesg | grep tty:
Kernel command line: noinitrd loglevel=7 no_console_suspend console=ttymxc1,115200
fec_mac=00:05:51:07:B3:B5 mtdparts=gpmi- nand:512k(NBoot)ro,2m(UBoot)ro,256k(UBootEnv),256k
(UserDef),6m(Kernel)ro,-(TargetFS) gpmi_debug_init enable_wait_mode=off ubi.mtd=TargetFS root=ubi0:rootfs rootfstype=ubifs rootwait rw
bootconsole [ttymxc1] enabled
imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
imx-uart.1: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX
console [ttymxc1] enabled, bootconsole disabled
imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX
/proc/tty/driver
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
rfcomm /dev/rfcomm 216 0-255 serial
IMX-uart /dev/ttymxc 207 16-23 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
pty_slave /dev/ttyp 3 0-255 pty:slave
pty_master /dev/pty 2 0-255 pty:master
unknown /dev/tty 4 1-63 console
cat/proc/tty/driver/IMX-uart :
0: uart:IMX mmio:0x02020000 irq:58 tx:0 rx:0 DSR|CD
1: uart:IMX mmio:0x021E8000 irq:59 tx:12075 rx:358 RTS|DTR|DSR|CD
2: uart:IMX mmio:0x021EC000 irq:60 tx:0 rx:0 DSR|CD