|
发表于 2020-9-3 16:08:23
浏览:6412
|
回复:2
打印
只看该作者
[复制链接]
楼主
本帖最后由 tigerlh 于 2020-9-4 10:31 编辑
日志输出的串口ttyS0波特率参照文档修改成了115200;
但是,其它的串口试了多种方法都无法修改波特率,使用过的方法有:
1. stty -F /dev/ttyS3 speed 115200
2. dtsi文件修改:
uart3: serial@ff0d0000 {
compatible = "rockchip,rk3308-uart", "snps,dw-apb-uart";
reg = <0x0 0xff0d0000 0x0 0x100>;
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
clock-names = "baudclk", "apb_pclk";
baudrate = <115200>;
speed = <115200>;
= <115200>;
reg-shift = <2>;
reg-io-width = <4>;
dmas = <&dmac0 10>, <&dmac0 11>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart3_xfer>;
status = "okay";
};
之后用stty -F /dev/ttyS3查看波特率依然为9600:
speed 9600 baud; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>;
start = <undef>; stop = <undef>; susp = <undef>; rprnt = <undef>;
werase = <undef>; lnext = <undef>; discard = <undef>; min = 0; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
请指教 |
|