Need help with UART 2(/dev/ttyO1) on beagleboard xm rev.c

Hi,

I have a beagleboard xm rev.c with linux-angstrom(kernel-3.2) running on it. I am trying to access the uart port which is there on the expansion connector P9(pin.6 and pin.8).

pin.6 → UART2_TX ( named as McBSP3_CLKX, gpio.146, ballentry - aa25)

pin.8 → UART2_RX ( named as McBSP3_FSX, gpio.143, ballentry - ae5 )

So far i have been able to get the UART2_TX working, where characters that are sent out are seen on the oscilloscope. To verify Rx, i used a jumper on Tx and Rx to short both of them and tried to read back what I sent( using echo 1 > /dev/ttyO1) but i dont see anything when i do cat /dev/ttyO1.

I found a link ( http://elinux.org/BeagleBoardPinMux ) in elinux.org which tells about enabling the UART2 on beagleboard. I tried both the methods, one enabling via kernel and other via u-boot(by disabling the gpio mux facility in menuconfig), but no behavior of Rx on the UART2 pin.

changes i did to the files are given below.

  1. as described for u-boot method in the link

file uboot-2011.12/board/ti/beagle/beagle.h

MUX_VAL(CP(McBSP3_FSX), (IEN | PTD | DIS | M1)) /alternative UART2_RX/\

parameter M1 since UART2_RX functionality on this pin is in Mode.1 (refer pg. 34/280 DM3730 datasheet)

  1. as described for kernel method in the link by enabling OMAP_MUX facility in menuconfig.

file arch/arm/mach-omap2/board-omap3beagle.c

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), //this line was added to enable uart
{ .reg_offset = OMAP_MUX_TERMINATOR },
};

I have pasted the log that is generated after doing cat /proc/tty/serial/OMAP-SERIAL

[root@beagleboard-xm driver]# cat OMAP-SERIAL
serinfo:1.0 driver revision:
0: uart:OMAP UART0 mmio:0x4806A000 irq:72 tx:0 rx:0 CTS|DSR|CD|RI
1: uart:OMAP UART1 mmio:0x4806C000 irq:73 tx:0 rx:0 CTS|DSR|CD|RI
2: uart:OMAP UART2 mmio:0x49020000 irq:74 tx:734 rx:109 RTS|CTS|DTR|DSR|CD|RI
3: uart:OMAP UART3 mmio:0x49042000 irq:80 tx:0 rx:0 CTS|DSR|CD|RI
[root@beagleboard-xm driver]#
[root@beagleboard-xm driver]#
[root@beagleboard-xm driver]#
[root@beagleboard-xm driver]# echo a > /dev/ttyO1
[ 72.392358] KN:uart_open(1) called
[ 72.397952]
[ 72.397959] KN:uart_close(1) called
[root@beagleboard-xm driver]# cat OMAP-SERIAL
serinfo:1.0 driver revision:
0: uart:OMAP UART0 mmio:0x4806A000 irq:72 tx:0 rx:0 CTS|DSR|CD|RI
1: uart:OMAP UART1 mmio:0x4806C000 irq:73 tx:9 rx:9 CTS|DSR|CD|RI
2: uart:OMAP UART2 mmio:0x49020000 irq:74 tx:1292 rx:145 RTS|CTS|DTR|DSR|CD|RI
3: uart:OMAP UART3 mmio:0x49042000 irq:80 tx:0 rx:0 CTS|DSR|CD|RI

does this log indicate that I am receiving the data to the kernel space but not to user space. If so the how to get the data to the user space. if this is incorrect please point out what has to be done to get the Rx of UART working.

thanking you,

Shravan Kulkarni

Hi,

Hi Keesj,
Thank you for your reply. I used minicom on my host machine to access the beagleboard via serial port, UART 3 on the beagleboard. once i have the access i was able to give that command. I have pasted the trial that i did with UART3 (/dev/ttyO2) which is working.

[root@beagleboard-xm driver]# echo 5 > /dev/ttyO2
5
[root@beagleboard-xm driver]#

regards,
Shravan Kulkarni