i have enabled the Uart in linux source and created a image how to test the uart working

折月煮酒 提交于 2019-12-25 01:44:47

问题


hi I am newbie please help me i have enabled the Uart in linux source and created a image,and while kernel boot time its showing me the log

Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled                        
serial8250.0: ttyS0 at MMIO 0x4000c000 (irq = 5) is a 16550A                    
console [ttyS0] enabled                                                         
serial8250.2: ttyS1 at MMIO 0x40098000 (irq = 7) is a 16550A                    
serial8250.3: ttyS2 at MMIO 0x4009c000 (irq = 8) is a 16550A

and ttyS0 is used for interaction between host terminal and my target board that is working well, I want to test ttyS1(connection tx=P0.10 rx=P0.11) and ttyS2(connection tx=P0.1 rx=P0.3) and use those for the other device. before using those for other device to coonect I want to test those by shorting tx and rx how to test the these uart working


回答1:


There are any number of terminal emulators that will work with serial ports, including microcom, minicom, nanocom, picocom, etc. See if any of these were installed along with your Linux distribution. When you have RX tied to TX and open one of these emulators then any keys you type should appear on the screen.

Additionally there is a very simple POSIX communications test application out on the web. Here's a link to one of the places you can get it: http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html



来源:https://stackoverflow.com/questions/17162659/i-have-enabled-the-uart-in-linux-source-and-created-a-image-how-to-test-the-uart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!