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.

am335x 串口收发的问题



各位前辈好,

我在测试串口自收自发时,每次read只能接收16个字节,多接几次也能接完,数据也是正常的,如果我想一次性接完,这个是在哪里设置的?

还有一个问题就是,我只是短接了ttyO1的rx和tx,但是在串口测试程序中,将ttyO1改成ttyO5(没有短接),为什么还能正常自收自发呢?其余串口也是一样

  • 除了ttyO1,其余串口自收自发的问题已解决,这是我的配置,不知道问题出在哪里,能帮我看看哪里需要改么?

    static struct pinmux_config uart1_pin_mux[] = {
        {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW |AM33XX_PIN_INPUT_PULLUP},
        {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_UP | AM33XX_PULL_DISA | AM33XX_SLEWCTRL_SLOW},
        {NULL, 0},
    };

    static void uart1_init(int evm_id, int profile)
    {
        setup_pin_mux(uart1_pin_mux);
        return;
    }

    {uart1_init,    DEV_ON_BASEBOARD, PROFILE_0},

            _AM33XX_MUXENTRY(UART1_RXD, 0,
                "uart1_rxd", "mmc1_sdwp", NULL, "i2c1_sda",
                NULL, "pr1_uart0_rxd_mux1", NULL, "gpio0_14"),
            _AM33XX_MUXENTRY(UART1_TXD, 0,
                "uart1_txd", "mmc2_sdwp", NULL, "i2c1_scl",
                NULL, "pr1_uart0_txd_mux1", NULL, "gpio0_15"),