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处理器运行linux系统时串口如何支持非标波特率通信

Other Parts Discussed in Thread: AM3352

我们使用的是AM3352处理器,运行linux系统,使用TI官方SDK6.0开发,相应linux系统内核版本为:linux-3.2.0-psp04.06.00.11。

系统调试串口使用的是uart1,现在需要使用uart2作为通信串口与一个470MHz的无线模块通信,需要波特率为14400才能正常通信。

百度了一种方法,通过应用层修改分频实现设定任意波特率:

blog.chinaunix.net/uid-9543173-id-1988980.html

但实际测试时发现无法使用,这种方法最终会调用到一个omap-serial.c里面的serial_omap_verify_port函数,异常终止,但该函数显示禁止内核修改串口参数的提示:

static int serial_omap_verify_port(struct uart_port *port, struct serial_struct *ser)
{
/* we don't want the core code to modify any port params */
dev_dbg(port->dev, "serial_omap_verify_port+\n");
return -EINVAL;
}

即便我们将函数调用过程中一些异常信息屏蔽,最终执行完成后,也提示分频和波特率修改成功,但是最终仍然无法按照设定的波特率和外设正常通信。

难道是AM335x不支持串口非标波特率?请问哪位有在AM335x下设定串口非标波特率的方法,非常感谢。