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.
i want to use ttyS1 to transmit and receive data.(my program worked very well by ttyS0)
in /dev, i can find ttyS0 and ttyS1
when boot the kernel, it shows :
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A
serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
when i transmit some data by ttyS1,it shows:
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x01C20000 irq:40 membase 0xFBC20000 tx:5764 rx:53 RTS|CTS|D
TR|DSR
1: uart:16550A mmio:0x01D06000 irq:41 membase 0xFBD06000 tx:19104 rx:0 RTS|CTS|D
TR|DSR
it transmit some dates, but i receive nothing!!!
i using the default kernel, someone said maybe i must change the following file,
/ti-davinci/linux-2.6.18_pro500/arch/arm/mach-davinci/mux_cfg.c
in my system, it shows as follow:
265 MUX_CFG("UART0_RXD", 3, 20, 1, 1, 0)
266 MUX_CFG("UART0_TXD", 3, 19, 1, 1, 0)
267 MUX_CFG("UART1_RXD", 3, 17, 3, 2, 0)
269 MUX_CFG("UART1_TXD", 3, 15, 3, 2, 0)
271 MUX_CFG("UART1_RTS", 3, 23, 3, 1, 0)
272 MUX_CFG("UART1_CTS", 3, 21, 3, 1, 0)
273
274 MUX_CFG("EMAC_TX_EN", 3, 17, 3, 1, 0)
275 MUX_CFG("EMAC_TX_CLK", 3, 15, 3, 1, 0)
so who can tell me how to resolve this problem, how to use ttyS1
thx
You need to make sure the pins on your serial port match the MUX_CFG statements. There are two different locations that they can be assigned.
John A
hi John, thank you for your reply
could you tell me more clearly about the two locations?
i find in the dm365 UART1 RXD muxed GIO034, UART1 TXD muxed GIO025, so how do i set the parameters in the MUX_CFG like MUX_CFG("UART1_TXD", 3, 15, 3, 2, 0).
thx
I added these two statements to the init code for my board located in the kernel. This is necessary to make sure the pins are assigned and selected.
// Configure UART1
davinci_cfg_reg(DM365_UART1_TXD);
davinci_cfg_reg(DM365_UART1_RXD);
Of the top of my head I can't confirm that your MUX_CFG statement is correct for GIO034 and GIO025, so you might want to make sure that you are using the correct pins for your specific board.
John A
thanks for your reply,
i have found the two location of uart1, and resolve this problem :)
Hi
Can any one tell, how to configure UART1 so that i will be able to read and write through UART1. I have enabled the UART1 and also GIO16 and 17 pins as out and in respectively.
I have also set the UART1 Registers to work in FIFO mode.
can any one tell is some thing else i am missing in enabling the UART1 to read and write.
Thanks in advance,
Lokesh
Lokesh,
Along with what's posted here, read this thread...
http://e2e.ti.com/support/embedded/f/354/p/75483/274257.aspx#274257
John A