[#5338] cat string from target to host through sport uart would lost chars
Submitted By: Mingquan Pan
Open Date
2009-07-10 06:37:06 Close Date
2009-08-09 23:18:31
Priority:
Medium Assignee:
Sonic Zhang
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Not reproducible
Uboot version or rev.:
Toolchain version or rev.:
09r1-rc1
App binary format:
N/A
Summary: cat string from target to host through sport uart would lost chars
Details:
cat string from target to host through sport uart would lost chars.
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1-svn69
Created: 2009-07-10 4:14:23 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 5255269 Bytes = 5 MB
Load Address: 00001000
Entry Point: 0018889c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 0018889c
Linux version 2.6.28.10-ADI-2009R1-svn6950 (test@my-local-machine) (gcc version 4.1.2 (ADI svn)) #83 Fri Jul 10 12:14:09 CST 2009
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00105010
rodata = 0x00105010-0x00156238
bss = 0x00157000-0x00168720
data = 0x00168720-0x0017a000
stack = 0x00178000-0x0017a000
init = 0x0017a000-0x0099e000
available = 0x0099e000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf537-stamp:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 46924k/65536k RAM, (8336k init code, 1040k kernel code, 468k data, 1024k dma, 7744k reserved)
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (37 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 91
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
bfin-sport-uart.0: ttySS0 at MMIO 0xffc00800 (irq = 12) is a SPORT0
bfin-sport-uart.1: ttySS1 at MMIO 0xffc00900 (irq = 14) is a SPORT1
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-02 01:30:10 UTC (91810)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 8336k freed
dma_alloc_init: dma_page @ 0x0099b000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \\
d888888b. / _ _ \\
8P\"YP\"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \\ \\/ / |
8\' .88 \\ | | | | _ \\| | | | \\ / |
8`._.\' Y8. \\ | |__ | | | | | |_| | / \\ |
d/ `8b. \\ \\____||_|_| |_|\\____|/_/\\_\\ |
dP . Y8b. \\ For embedded processors including |
d8:\' \" `::88b \\ the Analog Devices Blackfin /
d8\" \'Y88b \\___________________________________/
:8P \' :888
8a. : _a88P For further information, check out:
._/\"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\\ YP\" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \\.___.d| .\' - http://www.uclinux.org/
`--..__)8888P`._.\' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-07-09 12:02:20 CST) built-in shell (msh)
Enter \'help\' for a list of built-in commands.
root:/> verPHY: 0:01 - Link is Up - 100/Full
sion
kernel: Linux release 2.6.28.10-ADI-2009R1-svn6950, build #83 Fri Jul 10 12:14:09 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8468, build #40 Fri Jul 10 12:13:21 CST 2009
root:/>
root:/> cat /proc/cmdline > ccc
root:/> stty -F /dev/ttySS0 cs7 ispeed 57600 ospeed 57600 -icrnl igncr min 1 tim
e 0
Warning: If you don\'t want to get rx underflow whenreceive rx
data on sport, don\'t use 8 bit uart mode.
root:/> cat /dev/ttySS0 > aaa
spawn /bin/sh
sh-3.00$ rcp root@10.100.4.50:/ccc .
sh-3.00$ stty -F /dev/ttyUSB0 cs7 ispeed 57600 ospeed 57600 -icrnl -ixon igncr -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoke -hupcl -echoctl min 1 time 0
sh-3.00$ cat ccc > /dev/ttyUSB0
sh-3.00$
Still wait.
^C
root:/>
root:/> diff -u ccc aaa
root:/>
Case 1 ...PASS
stty -F /dev/ttySS0 cs7 ispeed 57600 ospeed 57600 -icrnl igncr min 1 ti
me 0
root:/> ls
bbb build_serial_uart_kernel.exp ccc serial_uart_test.exp sport_uart_test.exp
build_serial_kernel.exp build_sport_uart_kernel.exp serial_test.exp serial_uart_test_log
sh-3.00$ stty -F /dev/ttyUSB0 cs7 ispeed 57600 ospeed 57600 -icrnl igncr min 1 time 0
sh-3.00$ cat /dev/ttyUSB0 > bbb
wait for receiving data...
cat ccc > /dev/ttySS0
root:/>
Still wait.
sh-3.00$ diff -u ccc bbb
--- ccc 2009-07-10 18:23:26.000000000 +0800
+++ bbb 2009-07-10 18:24:33.000000000 +0800
@@ -1 +1 @@
-root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf537-stamp:eth0:off
+oot=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf537-stamp:eth0:off
sh-3.00$
*******************************************************************
Follow-ups
--- Sonic Zhang 2009-07-13 02:40:04
Can't replicate.
root:/> vPHY: 0:01 - Link is Up - 100/Full
ersion
kernel: Linux release 2.6.28.10-ADI-2009R1-svn6924, build #42 Mon Jul 13
14:22:21 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8416, build #21 Mon Jul 13 14:21:48 CST 2009
root:/>
root:/> cat /proc/kallsyms > ccc
root:/> stty -F /dev/ttySS0 cs7 ispeed 57600 ospeed 57600 -icrnl igncr min 1
tim
e 0
Warning: If you don't want to get rx underflow whenreceive rx
data on sport, don't use 8 bit uart mode.
root:/> cat /dev/ttySS0 > aaa
spawn /bin/sh
eight:~/projects/uClinux-dist/testsuites/serial # rcp root@10.100.4.50:/ccc .
eight:~/projects/uClinux-dist/testsuites/serial # stty -F /dev/ttyUSB0 cs7
ispeed 57600 ospeed 57600 -icrnl -ixon igncr -opost -onlcr -isig -icanon -iexten
-echo -echoe -echok -echoke -hupcl -echoctl min 1 time 0
eight:~/projects/uClinux-dist/testsuites/serial # cat ccc > /dev/ttyUSB0
eight:~/projects/uClinux-dist/testsuites/serial #
Still wait.
^C
root:/>
root:/> diff -u ccc aaa
root:/>
Case 1 ...PASS
stty -F /dev/ttySS0 cs7 ispeed 57600 ospeed 57600 -icrnl igncr min 1 ti
me 0
root:/> ls
.svn build_serial_kernel.exp build_sport_uart_kernel.exp
serial_test.exp serial_uart_test_log
bbb build_serial_uart_kernel.exp ccc
serial_uart_test.exp sport_uart_test.exp
eight:~/projects/uClinux-dist/testsuites/serial # stty -F /dev/ttyUSB0 cs7
ispeed 57600 ospeed 57600 -icrnl igncr min 1 time 0
eight:~/projects/uClinux-dist/testsuites/serial # cat /dev/ttyUSB0 > bbb
wait for receiving data...
cat ccc > /dev/ttySS0
root:/>
Still wait.
eight:~/projects/uClinux-dist/testsuites/serial # diff -u ccc bbb
eight:~/projects/uClinux-dist/testsuites/serial #
Case 2 ...PASS
--- Mingquan Pan 2009-08-10 04:18:41
The cases can pass at the first time when the USB UART line is pluged into my
host machine. This issue has something related to my host machine. So close
here.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found