A40i的芯片板,尝试在系统中使用stty -F /dev/ttyS2 230400命令将uart2的波特率设置为230400。但是从外通过串口向板子发送数据,会出现乱码的问题。 从板子向外发送数据则正常。这是为什么呢?
上述串口只支持单向发送的问题要如何解决?求教!
PS:
会不会是时钟频率的问题(我瞎猜的)?因为我看到日志中有信息如下
[ 871.173494] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 871.570175] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 871.956396] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 872.338047] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 872.685208] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 886.738941] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]
[ 919.806558] sw_uart_check_baudset()893 - uart2, select set 1, baud 230400, ua
rtclk 24000000 beyond rance[30000000, 120000000]