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.

OMAP-L138串口不能收发

Other Parts Discussed in Thread: OMAP-L138

内核已经打印出这样的信息:

说明三个串口的驱动是没问题的。

可是在应用层中的测试程序打开ttyS0和ttyS1后,收不到数据,也发不出数据。不知道为啥会这样!!

  • omap-l138 mcdk linux kernel bad on ttyS1

    遇到同样问题, 请问如何解决ttyS1 不能收发数据的问题? 我用的内核是psp03.22.00.06.sdk中的 linux-3.3. 谢谢.

    我已经改动如下


    First you need to setup pinmuxing for UART1. Add these lines at in board-da850evm.c:

        static const short da850_evm_uart_pins[] = {
                DA850_UART1_RXD, DA850_UART1_TXD,
                -1
        };

    and in the da850_evm_init() function add

        ret = davinci_cfg_reg_list(da850_evm_uart_pins);
        if (ret)
                pr_warning("da850_evm_init: uart mux setup failed: %d\n", ret);

    The da850_evm_init() function disables all UARTs that are not used in Linux (currently UART 0 and UART 1). So you must modify it so UART1 does not get disabled. Comment out this code:

        /*        __raw_write(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30); */


    相同问题: http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/168896

  • 楼上的哥们儿:

    首先要确保你用的串口是打开的:

    static struct davinci_uart_config da850_evm_uart_config __initdata = {
    	.enabled_uarts = 0x7,
    		
    };

    其次,在3.3内核中应该是一个bug,必须要添加:

    __raw_writel(0x00006000, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
    __raw_writel(0x00006000, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);

    而在3.8内核中是不需要这样的。

    刚才回你邮件发布出去,特意来论坛回帖,试一下吧,祝你好运。

  • eagle lee,

    试了下你的bug fix, 好使了.

    谢谢哥们.

    我在北京,  有机会请你吃饭.  james_shang@126.com

    james