How to enable all(7) uarts on lpc3250 board
Hi,
I am working on LPC3250 board on linux(3.0.10) ubuntu(11.10).Basically only one UART1 has been enabled for BOOTING Process.But,In this board i want to use total 7 UARTS at a time.Then i need any special drivers for that or is it enough to enable the Standard UARTS(3,4,5,6) and HIGH SPEED UARTS(1,2,7) in menuconfig option of kernel?Please help me. Thanks & Regards, MOHAMMAD BIYABANI. |
"enable" them for what?
I have no experience with that board, but if I had to guess I'd say that all of them are probably "enabled" already, you just need to start using them. One of them (UART1) has been confiscated by the bootloader, and is probably hosting a TTY for the OS as well, but once you're in the OS the other 6 should be available in /dev/ like normal. |
Thanks for reply sir,
By default UART1 is displaying the booting messages But,Actually i want to display the booting messages with all UARTS at a time for my project requirement. How can i get that? Is any UART drivers are required to display booting messages by using all UARTS? I was also tried to enable them for displaying booting messages by enabling Standard and high speed UARTs in MENUCONFIG option of kernel but i didnt got it.I hope you understand what i want do sir. Thanks & Regards, Md.Biyabani. |
sorry for asked unrelated questions.Actually i have gone through the Lpc3250 manual and in that he told that by UART1 only we can display Booting messages and we cant display the booting messages using other UARTS.Actually i want to ask the thing is how to send and recieve the data using other UARTS in Linux kernel. I have idea about KEIL in windows. Is there any tool to execute serial communication programs in linux kernel?
Thanks & Regards, Md.Biyabani. |
Lots of tools exist. The driver is built into the kernel, so you can open up the device and read and write to it using nearly any programming language you want.
You can even run something like this from the command line to dump a message out over the serial line: Code:
stty -F /dev/ttyS2 115200 cs8 -cstopb -parenb |
Hi sir,Thanks for reply.
I have followed the commands what did you said like below procedure root@mohan:/home/mohan# stty -F /dev/ttyS2 115200 cs8 -cstopb -parenb root@mohan:/home/mohan# echo "goodbye cruel world" > /dev/ttyS2 But how can i know whether data is transmitted or not? Where can i see the data which is to be transmitted? Thanks & Regards, MOHAMMAD BIYABANI |
You would see the message on whatever device is attached to the other end of that serial connection, or you could hook up a logic analyzer to the Tx line to capture the message.
|
Use a terminal emulator such as C-Kermit or minicom. On the serial interface connector, connect the Tx pin the the Rx pin. With that done, everything you type in your terminal emulator should be echoed back to the screen. This is the simplest test of a serial interface possible to perform without any test equipment. A scope on the Tx pin should show the serial output data. Continuously transmitting the 'U' character will send a nice square wave, since the bit pattern of 'U' is alternating 1 & 0.
--- rod. |
Thanks for reply.
I tested with another PC which is attached to the UART5 of my LPC3250 and i have make echo then the data is recieved at that PC hyperterminal. But if i perform same operation with other UARTs like 2,3,4,6,7 of my board, then nothing is displayed on another end of PC hyperterminal.What may be the problem actually? Thanks & Regards, MOHAMMAD BIYABANI |
All kinds of potential problems. If you first perform the loopback test like I suggested, we can at east start to narrow down the possibilities. What does the datasheet for your board say about the nature of the UARTs in the system? Do you have a kernel with the correct drivers built in, or with the correct loadable modules installed? If you try to communicate through the serial interface, you need to have all of the communications parameters set in accordance with the peer host settings. Have you confirmed that this has been correctly done? Many devices use non-standard wiring of their connectors in order to save connector real-estate. How have you confirmed that your serial connectors are correctly connected to the peer PC?
--- rod. |
Hi,
The Datasheet states that we can load the loaders like kickstart and Stage1 using UART5 and we can boot the kernel messages using UART1 and it is not mentioned anything about other UARTs whether they are used for load and displaying purpose or not. I didnot performed loopback test but i am sure that all UARTs working properly in windows with KEIL but problem is when i am checking in LINUX KERNEL 2.6.34 version (I was installed this version on my host PC).is this version contains all UARTS drivers or not?If this version dont have all UART drivers then how can we install other drivers? If you idea please post the reply. I am waiting for reply. Thanks & Regards, MOHAMMAD BIYABANI |
Quote:
How is it that you are sure that all UART's are working, by doing some kind of test from a completely different host? They may well be working, but without actually exercising them, you are only assuming that. Simply running a similar kernel version on some other hardware tells you absolutely nothing whatsoever. The driver(s) for the UARTs depends on the type of hardware that implements the UART. Without knowing the nature of that hardware, it is impossible to know whether the drivers are installed, or even exist at all. There are many kinds of UARTs, and on small ARM systems, it is not uncommon for there to be custom UART implementations done in on-board FPGAs. In that case, only the vendor knows for sure how to interface to them, and this should be documented. I suggest a Google search for 'Linux serial console' as a jumping off point for further research. It will undoubtedly turn up a link to the Linux Serial Console HOWTO, among others. --- rod. |
Thanks for reply sir,
Today i have tested my board with loopback method(i connected TX to RX of UARTs) when i enter the characters on keyboard using UART5 and UART2 but nothing displayed on console(i used minicom program)linux os. I was checked my code which is dumping into my board that contains all code related to UARTs. And i also cheched my linux kernel that also contains the TTY drivers. can i confirm that fault in hardware or we need any extra drivers for serial communication? Thanks & Regards, MOHAMMAD BIYABANI. |
If the loopback test fails, then either the drivers are not loaded (but this is probably not the case),the hardware is faulty, or your port require some related handshake pins to be enabled, such as CTS. On boot (or with dmesg), do you see log entries that show successful loading of drivers for all ports? you say you've found drivers built into your kernel, but have you verified that they are actually the correct drivers? Are you sure you're using device names correctly associated with the respective UARTS (e.g. /dev/ttySx)? When you run setserial against each serial port, what are the results? Are you certain that you've connected the proper port pins in the loopback test?
Since you're now talking about your own code, here are some links to augment your understanding of matters related to that. Also, a link to a superior IMHO serial communications package. Serial Programming Serial-Howto Serial Programming Howto Serial Programming Guide for POSIX OS's C-Kermit C-Kermit --- rod. |
Hi sir,
1.MY console displaying messages about serial ports at the time of booting in linux(minicom) Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x40090000 (irq = 9) is a 16550A serial8250.0: ttyS1 at MMIO 0x40080000 (irq = 7) is a 16550A serial8250.0: ttyS2 at MMIO 0x40088000 (irq = 8) is a 16550A serial8250.0: ttyS3 at MMIO 0x40098000 (irq = 10) is a 16550A lpc32xx_hsuart.0: ttyTX0 at MMIO 0x40014000 (irq = 26) is a lpc32xx_hsuart console [ttyTX0] enabled lpc32xx_hsuart.0: ttyTX1 at MMIO 0x40018000 (irq = 25) is a lpc32xx_hsuart lpc32xx_hsuart.0: ttyTX2 at MMIO 0x4001c000 (irq = 24) is a lpc32xx_hsuart brd: module loaded loop: module loaded 2.In application the drivers i have are (in linux after booting) ~ # ls bin etc home linuxrc sbin usr dev ftp lib proc tmp var ~ # cd dev/ /dev # ls console mtd0 mtdr10 ptypf fb mtd1 mtdr11 ram fb0 mtd10 mtdr12 ram0 flash_environment mtd11 mtdr13 ram1 flash_kernel mtd12 mtdr14 rtc flash_monitor mtd13 mtdr15 tty flash_reserved mtd14 mtdr16 tty0 flasha mtd15 mtdr2 tty1 flasha1 mtd16 mtdr3 tty2 flasha2 mtd2 mtdr4 tty3 flasha3 mtd3 mtdr5 ttyCPM0 flasha4 mtd4 mtdr6 ttyCPM1 flasha5 mtd5 mtdr7 ttyCPM2 flasha6 mtd6 mtdr8 ttyCPM3 flasha7 mtd7 mtdr9 ttyCPM4 flashb mtd8 nftla ttyCPM5 flashb1 mtd9 nftla1 ttyS0 flashb2 mtdblock0 nftla2 ttyS1 flashb3 mtdblock1 nftla3 ttyS2 flashb4 mtdblock10 nftla4 ttyS3 flashb5 mtdblock11 nftla5 ttyS4 flashb6 mtdblock12 nftla6 ttyS5 flashb7 mtdblock13 nftla7 ttyS6 full mtdblock14 nftlb ttyS7 hda mtdblock15 nftlb1 ttyp0 hda1 mtdblock16 nftlb2 ttyp1 hda10 mtdblock2 nftlb3 ttyp2 hda11 mtdblock3 nftlb4 ttyp3 hda12 mtdblock4 null ttyp4 hda13 mtdblock5 ptyp0 ttyp5 hda14 mtdblock6 ptyp1 ttyp6 hda15 mtdblock7 ptyp2 ttyp7 hda16 mtdblock8 ptyp3 ttyp8 hda2 mtdblock9 ptyp4 ttyp9 hda3 mtdchar0 ptyp5 ttypa hda4 mtdchar1 ptyp6 ttypb hda5 mtdchar2 ptyp7 ttypc hda6 mtdchar3 ptyp8 ttypd hda7 mtdchar4 ptyp9 ttype hda8 mtdchar5 ptypa ttypf hda9 mtdchar6 ptypb zero kmem mtdchar7 ptypc mem mtdr0 ptypd mouse mtdr1 ptype 3.If i perform setserial then output is as follows (in linux terminal) root@mohan:/home/mohan# setserial -g /dev/ttyS[0123] /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 and i tested the all UARTS in windows without loopback that means normal data transmitting and recieving then i observed that all ports are working. are these drivers and settings fine? Thanks & Regards, MOHAMMAD BIYABANI. |
All times are GMT -5. The time now is 10:01 AM. |