打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
MLU220SOM底板在电平转换芯片之前短接了B19和B22,用于验证MLU220SOM串口(peri_uart0)数据环回是否正常。
stty -F /dev/ttyAMA1 -a
stty -F /dev/ttyAMA1 speed 115200 cs8 -parenb -cstopb -crtscts -echo
stty -F /dev/ttyAMA1 -a
cat /dev/ttyAMA1 > ~/read_ttyAMA1.log & #注:后台执行后,请回显出来的记住进程号,方便结束测试时,kill此后台进程。
echo "hello world!" > /dev/ttyAMA1
ls -la ~/read_ttyAMA1.logcat ~/read_ttyAMA1.log
kill -9 2345
以下是基于MLU220SOM测试的终端结果记录,测试结论:串口(peri_uart0)数据环回正常。
root@localhost:~# stty -F /dev/ttyAMA1 -a speed 115200 baud; rows 0; columns 0; 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; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar 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 -flusho -extproc root@localhost:~# stty -F /dev/ttyAMA1 speed 115200 cs8 -parenb -cstopb -crtscts -echo 115200 root@localhost:~# stty -F /dev/ttyAMA1 -a speed 115200 baud; rows 0; columns 0; 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; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar 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 -flusho -extproc root@localhost:~# cat /dev/ttyAMA1 > ~/read_ttyAMA1.log & [1] 2345 root@localhost:~# echo "hello world!" > /dev/ttyAMA1 root@localhost:~# ls -la ~/read_ttyAMA1.log -rw-r--r-- 1 root root 14 Dec 10 11:08 /root/read_ttyAMA1.log root@localhost:~# cat ~/read_ttyAMA1.log hello world! root@localhost:~# kill -9 2345 root@localhost:~#
热门帖子
精华帖子