Best posts made by lansecd
-
Reply: T113 (tina) 如何编译打包spi nand flash 固件
@jr_online 这两个地方和你的一样,还是没有跑起来
[ 2.345411] hub 2-0:1.0: USB hub found [ 2.349659] hub 2-0:1.0: 1 port detected [ 2.357934] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.369727] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.377228] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.380544] clk: Not disabling unused clocks [ 2.386918] cfg80211: failed to load regulatory.db [ 2.391717] ALSA device list: [ 2.400452] #0: audiocodec [ 2.403812] alloc_fd: slot 0 not NULL! [ 2.408372] /dev/root: Can't open blockdev [ 2.413024] VFS: Cannot open root device "ubiblock0_5" or unknown-block(0,0): error -6 [ 2.421929] Please append a correct "root=" boot option; here are the available partitions: [ 2.431306] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 2.440572] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.61 #108 [ 2.447397] Hardware name: Generic DT based system [ 2.452786] [<c010e248>] (unwind_backtrace) from [<c010a870>] (show_stack+0x10/0x14) [ 2.461472] [<c010a870>] (show_stack) from [<c07600a0>] (dump_stack+0x7c/0x98) [ 2.469573] [<c07600a0>] (dump_stack) from [<c011956c>] (panic+0x104/0x3d8) [ 2.477380] [<c011956c>] (panic) from [<c0b01270>] (mount_block_root+0x254/0x2fc) [ 2.485771] [<c0b01270>] (mount_block_root) from [<c0b014d0>] (prepare_namespace+0x138/0x178) [ 2.495329] [<c0b014d0>] (prepare_namespace) from [<c07745a0>] (kernel_init+0x8/0x10c) [ 2.504206] [<c07745a0>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 2.512688] Exception stack(0xc7825fb0 to 0xc7825ff8) [ 2.518348] 5fa0: 00000000 00000000 00000000 00000000 [ 2.527514] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.536680] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.544098] CPU1: stopping [ 2.547131] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.61 #108 [ 2.553956] Hardware name: Generic DT based system [ 2.559329] [<c010e248>] (unwind_backtrace) from [<c010a870>] (show_stack+0x10/0x14) [ 2.568011] [<c010a870>] (show_stack) from [<c07600a0>] (dump_stack+0x7c/0x98) [ 2.576108] [<c07600a0>] (dump_stack) from [<c010c648>] (handle_IPI+0xcc/0x168) [ 2.584305] [<c010c648>] (handle_IPI) from [<c033849c>] (gic_handle_irq+0x70/0x78) [ 2.592793] [<c033849c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 2.601177] Exception stack(0xc7865f80 to 0xc7865fc8) [ 2.606838] 5f80: 0000063c c7ecb4f4 00000000 c0114b40 00000002 c7864000 c0c04e28 c0c04e64 [ 2.616006] 5fa0: 4000406a 410fc075 00000000 00000000 c0c627d0 c7865fd0 c0107f94 c0107f84 [ 2.625169] 5fc0: 60000113 ffffffff [ 2.629080] [<c01021cc>] (__irq_svc) from [<c0107f84>] (arch_cpu_idle+0x1c/0x38) [ 2.637373] [<c0107f84>] (arch_cpu_idle) from [<c013de94>] (do_idle+0xd0/0x120) [ 2.645568] [<c013de94>] (do_idle) from [<c013e180>] (cpu_startup_entry+0x18/0x20) [ 2.654054] [<c013e180>] (cpu_startup_entry) from [<40102bec>] (0x40102bec) [ 2.661872] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
-
设置T113串口波特率为1M
用UART5非标准波率通信,波特率设置为1M,应用程序中串口配置如下:
//open uart fd = open("/dev/ttyS5", O_RDWR); if (fd < 0) { printf("open failed\n"); return -1; } /*set baudrate*/ tcgetattr(fd, &options); cfsetispeed(&options, B1000000); cfsetospeed(&options, B1000000); options.c_cflag |= (CLOCAL | CREAD); /*set databits*/ options.c_cflag &= ~CSIZE; options.c_cflag |= CS8; /*set crc*/ options.c_cflag &= ~PARENB; options.c_cflag &= ~CSTOPB; /*set stopbits*/ options.c_cflag &= ~CSTOPB; /*set parity*/ options.c_cflag &= ~PARENB; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_oflag &= ~OPOST; options.c_cc[VTIME] = 0; options.c_cc[VMIN] = 0;
系统启动后,启动应用程序,发现报如下错误:
[ 241.774864] sw_uart_check_baudset()837 - uart5, select set 5, baud 1000000, uartclk 24000000 beyond rance[31000000, 120000000]
发现串口的时钟源为24MHZ,不支持该波特率设置,于是查看Linux_UART_开发指南.pdf,查找波特率的修改方法,具体可以查看该开发指南,这里贴出修改方法。
修改设备树,修改串口的时钟源
/lichee/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsiuart5: uart@2501400 { compatible = "allwinner,sun8i-uart"; device_type = "uart5"; reg = <0x0 0x02501400 0x0 0x400>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <256>; clocks = <&ccu CLK_BUS_UART5>; clock-names = "uart5"; resets = <&ccu RST_BUS_UART5>; uart5_port = <5>; uart5_type = <2>; status = "disabled"; };
编译,烧录,启动发现终端乱码,这里把终端串口的时钟源也进行修改
uart0: uart@2500000 { compatible = "allwinner,sun8i-uart"; device_type = "uart0"; reg = <0x0 0x02500000 0x0 0x400>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <64>; clocks = <&ccu CLK_BUS_UART0>,<&ccu CLK_APB1>,<&ccu CLK_PSI_AHB>; clock-frequency = <50000000>; clock-names = "uart0"; resets = <&ccu RST_BUS_UART0>; uart0_port = <0>; uart0_type = <2>; status = "disabled"; };
再次,烧录,启动,运行程序,进行数据收发测试
Latest posts made by lansecd
-
Reply: T113+SPI NAND 零下40度,这样正常么?
@whycanservice 我也怀疑了NAND,NAND用的华邦的,温度也是-40-85。然后重新上电,spl,uboot也没反应,
-
T113+SPI NAND 零下40度,这样正常么?
大家有做过T113的低温实验么,零下40度工作出现了下面的情况:
[ 3.367765] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 3.370354] clk: Not disabling unused clocks [ 3.377538] cfg80211: failed to load regulatory.db [ 3.382098] ALSA device list: [ 3.390698] #0: audiocodec [ 3.391058] hub 1-1:1.0: USB hub found [ 3.393898] alloc_fd: slot 0 not NULL! [ 3.398583] hub 1-1:1.0: 4 ports detected [ 3.410969] VFS: Mounted root (squashfs filesystem) readonly on device 254:0. [ 3.420662] devtmpfs: mounted [ 3.425613] Freeing unused kernel memory: 1024K [ 3.460496] Run /sbin/init as init process [ 3.616526] init: Console is alive [ 3.620561] init: - watchdog - [ 3.624037] init: - preinit - [ 3.637034] SQUASHFS error: zlib decompression failed, data probably corrupt [ 3.647018] SQUASHFS error: squashfs_read_data failed to read block 0x1519f6 [ 3.654939] SQUASHFS error: Unable to read fragment cache entry [1519f6] [ 3.662496] SQUASHFS error: Unable to read page, block 1519f6, size 1b4b8 [ 3.670246] SQUASHFS error: Unable to read fragment cache entry [1519f6] [ 3.677766] SQUASHFS error: Unable to read page, block 1519f6, size 1b4b8 [ 3.685448] SQUASHFS error: Unable to read fragment cache entry [1519f6] [ 3.692995] SQUASHFS error: Unable to read page, block 1519f6, size 1b4b8 [ 3.700619] SQUASHFS error: Unable to read fragment cache entry [1519f6] [ 3.708063] SQUASHFS error: Unable to read page, block 1519f6, size 1b4b8 [ 3.715684] SQUASHFS error: Unable to read fragment cache entry [1519f6] [ 3.723170] SQUASHFS error: Unable to read page, block 1519f6, size 1b4b8 [ 3.731183] init: Failed to start kmodloader [ 3.780731] 8<--- cut here --- [ 3.784146] Unable to handle kernel paging request at virtual address 57ac6e9d [ 3.792152] pgd = a9329b06 [ 3.795144] [57ac6e9d] *pgd=00000000 [ 3.799103] Internal error: Oops: 805 [#1] PREEMPT SMP ARM [ 3.805176] Modules linked in: [ 3.808559] CPU: 1 PID: 1134 Comm: kworker/1:3 Not tainted 5.4.61 #239 [ 3.815791] Hardware name: Generic DT based system [ 3.815806] Workqueue: ubiblock0_5 ubiblock_do_work [ 3.826514] PC is at do_wait_for_common+0xfc/0x168 [ 3.831821] LR is at arch_spin_lock+0xc/0x48 [ 3.836546] pc : [<c0782ca4>] lr : [<c014f780>] psr: 20000193 [ 3.843484] sp : c72dda00 ip : 00100100 fp : 00000000 [ 3.849267] r10: 00000002 r9 : c078502c r8 : c7987748 [ 3.855050] r7 : c0c04e08 r6 : c72dc000 r5 : c7987744 r4 : 000001f4 [ 3.862282] r3 : 57ac6e9d r2 : c798774c r1 : c7987748 r0 : 00000000 [ 3.862293] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none [ 3.877506] Control: 10c5387d Table: 46b9c06a DAC: 00000051 [ 3.883868] Process kworker/1:3 (pid: 1134, stack limit = 0xee25e517) [ 3.891000] Stack: (0xc72dda00 to 0xc72de000) [ 3.895827] da00: 00000001 c7946400 c013a534 c798774c c798774c 2429ebe8 c0c1d898 c7987748 [ 3.904887] da20: c7987744 000001f4 00000002 c7987440 c8868000 00000002 c8868000 c0782d78 [ 3.913952] da40: c7987440 c72ddb9c c0c2a940 c7af8c00 c7987440 c040ca54 c7ebad80 c72b9980 [ 3.923014] da60: 00000113 c7af8ec8 c7986440 c8868000 c7987754 c7af8ec8 c72ddb9c 00000000 [ 3.932075] da80: c72ddb9c c72ddb64 c7986000 c7986390 c7af8c00 c7a53410 c7af8ec8 c0407bc8 [ 3.941136] daa0: 00000000 00000000 c72ddaec c0785f18 c72ddac0 c7986000 c72ddb20 c72ddb88 [ 3.950196] dac0: c72ddb64 c79862a4 00000000 c7a53410 c7a53410 c0408104 c7986000 00000000 [ 3.959258] dae0: 00000000 c7986000 c7af8c00 c72ddb64 c7af8ec8 c7986390 c04058e4 00000000 [ 3.968321] db00: c79862bc c04084e4 c0c04e08 60000113 00000001 00000000 00000000 c72ddb1c [ 3.977382] db20: c72ddb1c 2429ebe8 c72ddb38 c7af8c00 c72ddb64 c796d9c2 c0c04e08 00000001 [ 3.986443] db40: c72ddc7b c7af8c00 c72ddc6a c0408560 c796d9c0 c72ddb64 c796d9c2 c040866c [ 3.995503] db60: 00000002 c72ddbe0 c72ddc2c c7af8c00 00000000 c0405844 c72ddb14 00000003 [ 4.004563] db80: 00000000 ffffff8d c72ddb88 c72ddb88 00000000 c72ddb94 c72ddb94 c796d9c0 [ 4.013627] dba0: 00000000 00000002 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.022687] dbc0: 00000000 00000000 00000802 00000000 00000000 05f5e100 00000000 00000000 [ 4.031748] dbe0: c72ddc2c c72ddb64 00000000 c796d9c2 00000001 00000000 00000000 00000000 [ 4.040809] dc00: 00000000 00000000 00000000 00000000 00000000 00000810 00000000 00000000 [ 4.049869] dc20: 05f5e100 00000000 00000000 c72ddb64 c72ddbe0 2429ebe8 c72ddcb0 c0c04e08 [ 4.058931] dc40: c72ddcd8 c72ddc7b c72ddcad c7a2e858 ffff8caa c0c2a210 c0c02d00 c04025e0 [ 4.067994] dc60: 00000001 0000000f c00f00c0 2429ebe8 c0c04e08 c04023ac 00a2e858 2429ebe8 [ 4.077054] dc80: 2429ebe8 c7a2e858 c72ddcd8 c0c04e08 0000b6f5 08000000 c0c29e8c c7a2e858 [ 4.086116] dca0: 00000000 c0402b38 c7a2e84c c000000c f5b60013 2429ebe8 c72ddcd4 00000000 [ 4.095175] dcc0: c0c04e08 c7a2e858 00000000 00000000 00000000 c0403574 000002db 00000035 [ 4.104235] dce0: 00000000 00000000 00000800 c0b85800 00000000 00000000 00000800 2429ebe8 [ 4.113298] dd00: c7a2e880 c7a2e880 c72dddcc c72ddd28 c7a2e840 c03ffa80 c72dddcc c72ddd28 [ 4.122358] dd20: c0c2a210 c0c04e08 0000016d 00000035 00000000 00000000 00001000 c0b85000 [ 4.131418] dd40: 00000000 00000000 0000ac00 2429ebe8 00000000 c7b80400 00000000 00000000 [ 4.140479] dd60: c7b80400 00500000 00000000 c0b84c00 c090f8af c03e1cf0 c72dddcc c03e1cbc [ 4.149538] dd80: c72dddcc 00000000 c7b80400 05674c00 00000000 c03df45c c72dddcc 00000000 [ 4.158597] dda0: 05674c00 00000000 c0c04e08 c72dddcc c72dde30 05674c00 00000000 c03df514 [ 4.167660] ddc0: c72dddcc c0139868 c7838000 00000000 0000b000 00000400 00000000 00000000 [ 4.176720] dde0: 00000000 c0b84c00 00000000 2429ebe8 c7b23000 c7b23000 0000b000 00000159 [ 4.185780] de00: 00034c00 00000004 c0b84c00 c03f7ddc 0000b000 c72dde30 c0b84c00 00000000 [ 4.194840] de20: 05674c00 00000000 c7b23548 c0c04e08 00000005 2429ebe8 00000005 c7b23000 [ 4.203901] de40: 00000000 00000000 00000000 c72dc000 c69a5400 c69a5400 c72dc000 c03f6414 [ 4.212964] de60: 0000b000 80150011 00000005 00000159 00000000 c0b84c00 00000000 0000b000 [ 4.222024] de80: c6a13cd0 0000b000 c6a13cd0 c72dc000 c7b23000 c69a5400 00000000 c03f65b4 [ 4.231085] dea0: 00033c00 0000b000 00000000 c6a13cd8 c7f101e0 c69a5400 00000000 0000b000 [ 4.240144] dec0: c7b23000 00033c00 00000005 c6a13cd0 00000000 c03f509c 00033c00 0000b000 [ 4.249204] dee0: 00000000 2429ebe8 c6a13c00 00000000 c6a13cd0 0000b000 0000b000 c6a13c00 [ 4.258264] df00: c70c2600 00000000 00000000 c03fed20 0000b000 00000000 00000000 c693a600 [ 4.267327] df20: c7ec9980 c6a13cb0 ff7f1300 00000000 00000000 c6a13cb4 00000000 c012f434 [ 4.276388] df40: c693a600 c6a13cb0 c693a600 c693a614 c7ec9980 c72dc000 c7ec9998 c0c02d00 [ 4.285449] df60: c0c0d09c c012fa64 00000000 c7243b00 c72dc000 c693b540 c693a600 c012f830 [ 4.294509] df80: c7873ec4 c7243b1c 00000000 c0134270 c693b540 c0134154 00000000 00000000 [ 4.303569] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 [ 4.312631] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.321691] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 4.330763] [<c0782ca4>] (do_wait_for_common) from [<c0782d78>] (wait_for_common+0x30/0x48) [ 4.340020] [<c0782d78>] (wait_for_common) from [<c040ca54>] (sunxi_spi_transfer_one+0x500/0xb84) [ 4.349854] [<c040ca54>] (sunxi_spi_transfer_one) from [<c0407bc8>] (spi_transfer_one_message+0xd8/0x3e0) [ 4.360361] [ 4.360361] insmod_device_driver [ 4.360361] [ 4.360460] [<c0407bc8>] (spi_transfer_one_message) from [<c0408104>] (__spi_pump_messages+0x234/0x4c0) [ 4.367596] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator [ 4.377695] [<c0408104>] (__spi_pump_messages) from [<c04084e4>] (__spi_sync+ 0x148/0x1a0) [ 4.377703] [<c04084e4>] (__spi_sync) from [<c0408560>] (spi_sync+0x24/0x3c) [ 4.377711] [<c0408560>] (spi_sync) from [<c040866c>] (spi_write_then_read+0xf4/0x17c) [ 4.377721] [<c040866c>] (spi_write_then_read) from [<c04025e0>] (aw_spinand_chip_read_reg+0x30/0x50) [ 4.377731] [<c04025e0>] (aw_spinand_chip_read_reg) from [<c04023ac>] (aw_spinand_chip_wait+0x48/0xd8) [ 4.377741] [<c04023ac>] (aw_spinand_chip_wait) from [<c0402b38>] (aw_spinand_chip_read_single_page+0x160/0x27c) [ 4.377751] [<c0402b38>] (aw_spinand_chip_read_single_page) from [<c0403574>](aw_spinand_chip_read_super_page+0x68/0xcc) [ 4.377764] [<c0403574>] (aw_spinand_chip_read_super_page) from [<c03ffa80>](aw_spinand_read_oob+0x16c/0x1d8) [ 4.400618] device_chose finished 139! [ 4.406265] [<c03ffa80>] (aw_spinand_read_oob) from [<c03e1cf0>] (part_read_oob+0x34/0x6c) [ 4.406276] [<c03e1cf0>] (part_read_oob) from [<c03df45c>] (mtd_read_oob+0x70/0xcc) [ 4.406285] [<c03df45c>] (mtd_read_oob) from [<c03df514>] (mtd_read+0x5c/0x84) [ 4.406296] [<c03df514>] (mtd_read) from [<c03f7ddc>] (ubi_io_read+0x124/0x2cc) [ 4.406309] [<c03f7ddc>] (ubi_io_read) from [<c03f6414>] (ubi_eba_read_leb+0x210/0x2e8) [ 4.516768] [<c03f6414>] (ubi_eba_read_leb) from [<c03f65b4>] (ubi_eba_read_leb_sg+0xc8/0x134) [ 4.516783] [<c03f65b4>] (ubi_eba_read_leb_sg) from [<c03f509c>] (ubi_leb_read_sg+0x74/0xb4) [ 4.535658] [<c03f509c>] (ubi_leb_read_sg) from [<c03fed20>] (ubiblock_do_work+0xf0/0x108) [ 4.535672] [<c03fed20>] (ubiblock_do_work) from [<c012f434>] (process_one_work+0x144/0x210) [ 4.554159] [<c012f434>] (process_one_work) from [<c012fa64>] (worker_thread+0x234/0x2d8) [ 4.563228] [<c012fa64>] (worker_thread) from [<c0134270>] (kthread+0x11c/0x128) [ 4.563240] [<c0134270>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 4.579413] Exception stack(0xc72ddfb0 to 0xc72ddff8) [ 4.585006] dfa0: 00000000 00000000 00000000 00000000 [ 4.594065] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.603123] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 4.610456] Code: 1affffe6 e59d3010 e59d200c e5823004 (e5832000) [ 4.617204] ---[ end trace c70083dfb240bf2b ]--- [ 4.622316] note: kworker/1:3[1134] exited with preempt_count 1
-
Reply: 设置T113串口波特率为1M
@lansecd 在 设置T113串口波特率为1M 中说:
uart5: uart@2501400 {
compatible = "allwinner,sun8i-uart";
device_type = "uart5";
reg = <0x0 0x02501400 0x0 0x400>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
sunxi,uart-fifosize = <256>;
clocks = <&ccu CLK_BUS_UART5>;
clock-names = "uart5";
resets = <&ccu RST_BUS_UART5>;
uart5_port = <5>;
uart5_type = <2>;
status = "disabled";
};uart5: uart@2501400 { compatible = "allwinner,sun8i-uart"; device_type = "uart5"; reg = <0x0 0x02501400 0x0 0x400>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <256>; clocks = <&ccu CLK_BUS_UART5>,<&ccu CLK_APB1>,<&ccu CLK_PSI_AHB>; clock-frequency = <50000000>; clock-names = "uart5"; resets = <&ccu RST_BUS_UART5>; uart5_port = <5>; uart5_type = <2>; status = "disabled"; };
-
设置T113串口波特率为1M
用UART5非标准波率通信,波特率设置为1M,应用程序中串口配置如下:
//open uart fd = open("/dev/ttyS5", O_RDWR); if (fd < 0) { printf("open failed\n"); return -1; } /*set baudrate*/ tcgetattr(fd, &options); cfsetispeed(&options, B1000000); cfsetospeed(&options, B1000000); options.c_cflag |= (CLOCAL | CREAD); /*set databits*/ options.c_cflag &= ~CSIZE; options.c_cflag |= CS8; /*set crc*/ options.c_cflag &= ~PARENB; options.c_cflag &= ~CSTOPB; /*set stopbits*/ options.c_cflag &= ~CSTOPB; /*set parity*/ options.c_cflag &= ~PARENB; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_oflag &= ~OPOST; options.c_cc[VTIME] = 0; options.c_cc[VMIN] = 0;
系统启动后,启动应用程序,发现报如下错误:
[ 241.774864] sw_uart_check_baudset()837 - uart5, select set 5, baud 1000000, uartclk 24000000 beyond rance[31000000, 120000000]
发现串口的时钟源为24MHZ,不支持该波特率设置,于是查看Linux_UART_开发指南.pdf,查找波特率的修改方法,具体可以查看该开发指南,这里贴出修改方法。
修改设备树,修改串口的时钟源
/lichee/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsiuart5: uart@2501400 { compatible = "allwinner,sun8i-uart"; device_type = "uart5"; reg = <0x0 0x02501400 0x0 0x400>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <256>; clocks = <&ccu CLK_BUS_UART5>; clock-names = "uart5"; resets = <&ccu RST_BUS_UART5>; uart5_port = <5>; uart5_type = <2>; status = "disabled"; };
编译,烧录,启动发现终端乱码,这里把终端串口的时钟源也进行修改
uart0: uart@2500000 { compatible = "allwinner,sun8i-uart"; device_type = "uart0"; reg = <0x0 0x02500000 0x0 0x400>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <64>; clocks = <&ccu CLK_BUS_UART0>,<&ccu CLK_APB1>,<&ccu CLK_PSI_AHB>; clock-frequency = <50000000>; clock-names = "uart0"; resets = <&ccu RST_BUS_UART0>; uart0_port = <0>; uart0_type = <2>; status = "disabled"; };
再次,烧录,启动,运行程序,进行数据收发测试