V3S UART0 能够发送数据,不能接收数据,用的是PB8 PB9。能把数据发给设备,设备能工作,接收不到设备的信号,RXD上有信号,但V3S没有接收,程序是对的,目前估计是内核或者UBOOT 里面将接收禁用了,不知道哪位调试过,分享一下经验。
离线
是的,上电打印日志
离线
离线
发送数据到设备,设备接收数据能正常工作,但设备回发的数据,V3S没有打印出来,RXD上有信号
离线
调试功能关闭,才可以正常使用UART0是吧?如何关闭
有没有代码分享的?
离线
目前我输入命令用的是telnet,不用串口,串口顶多就是看一下打印的信息。能不能在程序中更改?上电完成后,自己写的程序能不能关闭?
离线
我这边只找到这里定义,是这里吗
离线
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 init=/linuxrc loglevel=8 partitions= mac_addr= uid=1234567890 kmemleak=on rootfstype=cramfs
这是启动日志,是看这里吗?
完整如下:
HELLO! BOOT0 is starting!
get_ifm reg_val=7
===i2c gpio === 22777777
axp read fail, maybe no pmu
set pmu vol failed,maybe no pmu
DRAM DRIVE INFO: V0.7
DRAM Type = 2 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
DRAM CLK = 408 MHz
DRAM zq value: 000039bb
DRAM size = 64 MB
Succeed in reading Boot1 file head.
Jump to secend Boot.
[ 0.484]
U-Boot 2011.09-rc1-00000-g63a73aff4-dirty (Sep 02 2020 - 02:51:17) Allwinner Technology
[ 0.493]version: 1.1.0
[ 0.499]pmbus:
===i2c gpio === 22777777
ready
axp read error
probe axp20x failed
axp_probe fail,run clock=912
set power on vol to default
axp_set_power_supply_output dcdc2_vol = 1250
axp set dcdc2_vol to 1250 failed
axp_set_power_supply_output dcdc3_vol = 3300
axp set dcdc3_vol to 3300 failed
axp_set_power_supply_output aldo2_vol = 2500
axp set aldo2_vol to 2500 failed
axp_set_power_supply_output aldo3_vol = 3000
axp set aldo3_vol to 3000 failed
axp_set_power_supply_output ldo1_vol = 3300
axp set ldo1_vol to 3300 failed
axp_set_power_supply_output ldo2_vol = 3000
axp set ldo2_vol to 3000 failed
axp_set_power_supply_output ldo3_vol = 3000
axp set ldo3_vol to 3000 failed
[ 0.836]DRAM: 64 MiB
[debug_jaosn]:use the clock in sys_config
OK
[ 0.858]sunxi flash init ok
hello @flash_speed=1
env_relocate_spec storage_type = 3
In: serial
Out: serial
Err: serial
WORK_MODE_BOOT
read bootlogo partition fail,start_block=0x0,rblock=0x0 ,ret=0
Not a JPG file ?
parse_header failed
Use decode 2x1 sampling
sunxi_read_bootlogo: jpg convert argb
[ 0.892]Hit any key to stop autoboot: 0
read boot or recovery all
try to read all
[ 1.110]sunxi flash read :offset 4000, 3145728 bytes OK
## Booting kernel from Legacy Image at 40007fc0 ...
Image Name: Linux-3.4.39
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2352264 Bytes = 2.2 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
[ 1.161]
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.4.39 (root@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #104 Wed Sep 2 02:54:35 PDT 2020
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun8i
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat c04b01a8, node_mem_map c04e5000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16256 pages, LIFO batch:3
[ 0.000000] script_init enter!
[ 0.000000] script_init exit!
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 init=/linuxrc loglevel=8 partitions= mac_addr= uid=1234567890 kmemleak=on rootfstype=cramfs
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 64MB = 64MB total
[ 0.000000] Memory: 59868k/59868k available, 5668k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff000000 ( 936 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0450000 (4384 kB)
[ 0.000000] .init : 0xc0450000 - 0xc0474000 ( 144 kB)
[ 0.000000] .data : 0xc0474000 - 0xc04b08c0 ( 243 kB)
[ 0.000000] .bss : 0xc04b08e4 - 0xc04e4240 ( 207 kB)
[ 0.000000] NR_IRQS:544
[ 0.000000] 524 ahb1 set parent pll_periph0d2
[ 0.000000] Architected local timer running at 24.00MHz.
[ 0.000000] Switching to timer-based delay loop
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000167] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[ 0.000192] pid_max: default: 32768 minimum: 301
[ 0.000347] Mount-cache hash table entries: 512
[ 0.000889] CPU: Testing write buffer coherency: ok
[ 0.001150] Setting up static identity map for 0x4033ae58 - 0x4033aeb0
[ 0.001809] devtmpfs: initialized
[ 0.003670] pinctrl core: initialized pinctrl subsystem
[ 0.003861] NET: Registered protocol family 16
[ 0.004209] DMA: preallocated 128 KiB pool for atomic coherent allocations
[ 0.004271] script_sysfs_init success
[ 0.004310] sunxi_dump_init success
[ 0.005103] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[ 0.006048] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[ 0.006851] tsc2003 device registered
[ 0.007170] [sunxi-module]: [sunxi-module.0] probe success
[ 0.007222] script config pll_isp to 360 Mhz
[ 0.007255] Not Found clk pll_video in script
[ 0.007270] script config pll_ve to 360 Mhz
[ 0.007291] Not Found clk pll_periph0 in script
[ 0.007301] Not Found clk pll_de in script
[ 0.007309] sunxi_default_clk_init
[ 0.007318] try to set pll6ahb1 to 200000000
[ 0.007328] Error not get clk pll6ahb1
[ 0.007341] Error not get clk pll6ahb1try to set ahb1 to 200000000
[ 0.007362] try to set apb1 to 100000000
[ 0.007629] ===fe3o4==== sunxi_root_procfs_attach ret:0
[ 0.011542] bio: create slab <bio-0> at 0
[ 0.011793] pwm module init!
[ 0.013436] SCSI subsystem initialized
[ 0.013669] usbcore: registered new interface driver usbfs
[ 0.013747] usbcore: registered new interface driver hub
[ 0.013920] usbcore: registered new device driver usb
[ 0.014062] twi_chan_cfg()342 - [twi0] has no twi_speed!
[ 0.014075] twi_chan_cfg()353 - [twi0] has no twi_regulator.
[ 0.014089] twi_chan_cfg()342 - [twi1] has no twi_speed!
[ 0.014099] twi_chan_cfg()353 - [twi1] has no twi_regulator.
[ 0.014110] sunxi_i2c_adap_init()1563 - Sunxi I2C init channel 0
[ 0.014266] ++sunxi_i2c_probe
[ 0.014317] twi_request_gpio()406 - Pinctrl init 0 ... [twi0]
[ 0.014432] twi_clk_write_reg()241 - twi_clk_write_reg: clk_n = 0, clk_m = 5
[ 0.014572] sunxi_i2c_probe()1250 - I2C: i2c-0: sunxi I2C adapter
[ 0.014592] sunxi_i2c_probe()1251 - TWI_CTL 0xf1c2ac0c: 0x00000040
[ 0.014606] sunxi_i2c_probe()1252 - TWI_STAT 0xf1c2ac10: 0x000000f8
[ 0.014620] sunxi_i2c_probe()1253 - TWI_CLK 0xf1c2ac14: 0x00000028
[ 0.014633] sunxi_i2c_probe()1254 - TWI_SRST 0xf1c2ac18: 0x00000000
[ 0.014645] sunxi_i2c_probe()1255 - TWI_EFR 0xf1c2ac1c: 0x00000000
[ 0.014853] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.015754] cfg80211: Calling CRDA to update world regulatory domain
[ 0.016724] Switching to clocksource arch_sys_counter
[ 0.019968] NET: Registered protocol family 2
[ 0.019968] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.020353] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.020404] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.020434] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.020446] TCP: reno registered
[ 0.020460] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.020483] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.020754] NET: Registered protocol family 1
[ 0.021131] RPC: Registered named UNIX socket transport module.
[ 0.021147] RPC: Registered udp transport module.
[ 0.021156] RPC: Registered tcp transport module.
[ 0.021165] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.021553] [pm]aw_pm_init!
[ 0.021574] standby_mode = 1.
[ 0.021583] wakeup src cnt is : 3.
[ 0.021644] sunxi_reg_init enter
[ 0.023341] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.023395] NFS: Registering the id_resolver key type
[ 0.023773] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.024009] msgmni has been set to 116
[ 0.025032] io scheduler noop registered
[ 0.025048] io scheduler deadline registered
[ 0.025135] io scheduler cfq registered (default)
[ 0.025425] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[ 0.025759] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[ 0.025777] sw_uart_pm()890 - uart0 clk is already enable
[ 0.025799] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[ 0.121509] console [ttyS0] enabled
[ 0.718958] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[ 0.726690] spi spi0: master is unqueued, this is deprecated
[ 0.733170] m25p_probe()1007 - Use the Dual Mode Read.
[ 0.738960] NorFlash ID: 0xef4018 - 0x0
[ 0.743278] NorFlash Unique ID: d2668858c71b3c2c6933442c630d1e16
[ 0.749963] m25p80 spi0.0: found W25q128, expected at25df641
[ 0.756262] m25p80 spi0.0: W25q128 (16384 Kbytes)
[ 0.762966] @@@[debug_jaosn]: Invalid partitions count: 4 8
[ 0.769640] Creating 7 MTD partitions on "spi0.0":
[ 0.775006] 0x000000000000-0x000000040000 : "uboot"
[ 0.781496] 0x000000040000-0x000000340000 : "boot"
[ 0.787735] 0x000000340000-0x000000bb0000 : "system"
[ 0.794240] 0x000000bb0000-0x000000eb0000 : "app"
[ 0.800436] 0x000000eb0000-0x000000f30000 : "cfg"
[ 0.806527] 0x000000f30000-0x000000f40000 : "env"
[ 0.812677] 0x000000f40000-0x000000f50000 : "private"
[ 0.819447] priv->phy_ext = INT_PHY
[ 0.824620] Failed to alloc md5
[ 0.828150] eth0: Use random mac address
[ 0.832684] usbcore: registered new interface driver asix
[ 0.838733] usbcore: registered new interface driver cdc_ether
[ 0.845268] usbcore: registered new interface driver net1080
[ 0.851597] usbcore: registered new interface driver rndis_host
[ 0.858223] usbcore: registered new interface driver cdc_subset
[ 0.864846] usbcore: registered new interface driver zaurus
[ 0.871105] usbcore: registered new interface driver cdc_ncm
[ 0.877385] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.904723] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.913654] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[ 0.922174] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[ 0.940049] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[ 0.947357] hub 1-0:1.0: USB hub found
[ 0.951580] hub 1-0:1.0: 1 port detected
[ 0.956383] sunxi-ehci sunxi-ehci.1: remove, state 1
[ 0.961933] usb usb1: USB disconnect, device number 1
[ 1.262335] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[ 1.278618] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.305565] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[ 1.314096] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[ 1.322547] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[ 1.384684] hub 1-0:1.0: USB hub found
[ 1.388864] hub 1-0:1.0: 1 port detected
[ 1.393652] sunxi-ohci sunxi-ohci.1: remove, state 1
[ 1.399174] usb usb1: USB disconnect, device number 1
[ 1.405388] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[ 1.421691] Initializing USB Mass Storage driver...
[ 1.427185] usbcore: registered new interface driver usb-storage
[ 1.433864] USB Mass Storage support registered.
[ 1.439109] usbcore: registered new interface driver usbserial
[ 1.445647] usbcore: registered new interface driver usbserial_generic
[ 1.452940] USB Serial support registered for generic
[ 1.458542] usbserial: USB Serial Driver core
[ 1.463426] usbcore: registered new interface driver option
[ 1.469638] USB Serial support registered for GSM modem (1-port)
[ 1.476475] g_ether gadget: using random self ethernet address
[ 1.482982] g_ether gadget: using random host ethernet address
[ 1.489981] usb0: MAC 46:28:aa:31:a0:48
[ 1.494279] usb0: HOST MAC ba:25:34:fa:6f:60
[ 1.499094] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.508579] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.518054] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ef0, 0xc39dde00, ep1out-bulk)
[ 1.527620] gadget_is_softwinner_otg is not -int
[ 1.532746] gadget_is_softwinner_otg is not -int
[ 1.537889] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.547366] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ea4, 0xc39dde00, ep1in-bulk)
[ 1.556838] ep_matches, wrn: endpoint already claimed, ep(0xc04a3ef0, 0xc39dde00, ep1out-bulk)
[ 1.566402] gadget_is_softwinner_otg is not -int
[ 1.571527] gadget_is_softwinner_otg is not -int
[ 1.576657] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 1.584019] g_ether gadget: g_ether ready
[ 1.588583] sunxikbd_script_init: key para not found, used default para.
[ 1.596678] tsc2003_ts_init
[ 1.599780] =====ctp_fetch_sysconfig_para=====.
[ 1.604936] ctp_fetch_sysconfig_para: ctp_unused.
[ 1.610259] =========script_get_item_err============
[ 1.615765] tsc2003_ts_init: ctp_fetch_sysconfig_para err.
[ 1.622372] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[ 1.629770] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[ 1.636946] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[ 1.648157] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[ 1.655622] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[ 1.661818] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[ 1.671449] [mmc]: SD/MMC/SDIO Host Controller Driver(v1.114 2015-6-2 10:21) Compiled in Aug 26 2020 at 01:08:27
[ 1.682809] [mmc]: get mmc0's sdc_power failed
[ 1.687752] [mmc]: MMC host used card: 0x1, boot card: 0x0, io_card 0
[ 1.695687] [mmc]: sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 1.708546] usbcore: registered new interface driver usbhid
[ 1.714760] usbhid: USB HID core driver
[ 1.721200] asoc: sndcodec <-> sunxi-codec mapping ok
[ 1.728795] TCP: cubic registered
[ 1.732526] NET: Registered protocol family 17
[ 1.737523] Registering the dns_resolver key type
[ 1.743014] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 1.751542] ThumbEE CPU extension supported.
[ 1.756297] Registering SWP/SWPB emulation handler
[ 1.762544] sunxi-rtc sunxi-rtc: setting system clock to 2020-09-03 19:23:51 UTC (1599161031)
[ 1.773443] [wifi module_pm]: select module num is 6
[ 1.778967] [wifi module_pm]: step [0] failed to fetch module_power0
[ 1.786075] [wifi module_pm]: mod has no chip_en gpio
[ 1.791688] [wifi module_pm]: failed to fetch lpo_use_apclk
[ 1.798170] [wifi_pm]: wifi gpio init is OK !!
[ 1.803222] ALSA device list:
[ 1.806513] #0: audiocodec
[ 1.814425] VFS: Mounted root (cramfs filesystem) readonly on device 31:2.
[ 1.822173] devtmpfs: mounted
[ 1.825652] Freeing init memory: 144K
chmod: /etc/hotplug/insert.sh: Read-only file system
chmod: /etc/hotplug/remove.sh: Read-only file system
cp cron config file to /var/spool/cron/crontabs
Starting logging: crond[69]: crond (busybox 1.27.1) started, log level 8
OK
read-only file system detected...done
Starting nginx...
start-stop-daemon: can't execute '/usr/sbin/nginx': No such file or directory
Starting telnetd: OK
Starting mount: umount: can't unmount /dev/mmcblk0p1: No such file or directory
mount: mounting /dev/mmcblk0p1 on /app/sd01 failed: No such file or directory
/etc/init.d/S60mount: line 61: /app/sd01/webserver/nginx/sbin/nginx: not found
OK
Starting network:
method: 2
address: 192.168.0.100
netmask: 255.255.255.0
gateway: 192.168.0.1
dns: 192.168.0.1
[ 5.587063] gmac0: probed
[ 5.595756] eth0: PHY ID 00441400 at 0 IRQ poll (gmac0-0:00)
OK
Starting S80system:
Welcome to Buildroot
buildroot login: [ 9.595171] PHY: gmac0-0:00 - Link is Up - 100/Full
离线
还没改,是这里吧
离线
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 init=/linuxrc loglevel=8 partitions= mac_addr= uid=1234567890 kmemleak=on rootfstype=cramfs
没改好吧?
一般在哪里改的?
离线
linux-3.4 内核 u-boot-2011.09 UBOOT 应该是BSP,哇酷小二会改吗?有偿更改。可以改成UART2为调试串口,UART0改为普通串口
离线
我试试,谢谢
离线