[#5778] receive data through sport uart ttySS0 from host has different chars on 09R1 branch
Submitted By: Mingquan Pan
Open Date
2009-12-16 02:48:56 Close Date
2009-12-18 04:55:32
Priority:
Medium High 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.:
ADI-09r1.1-2
App binary format:
N/A
Summary: receive data through sport uart ttySS0 from host has different chars on 09R1 branch
Details:
rceive data through sport uart ttySS0 from host has different chars on 09R1 branch.
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1.1-svn
Created: 2009-12-16 6:19:05 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4681977 Bytes = 4.5 MB
Load Address: 00001000
Entry Point: 00188888
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 00188888
Linux version 2.6.28.10-ADI-2009R1.1-svn8001 (test@my-local-machine) (gcc version 4.1.2 (ADI svn)) #6 Wed Dec 16 14:18:54 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-0x001051e0
rodata = 0x001051e0-0x00156460
bss = 0x00157000-0x00168720
data = 0x00168720-0x0017a000
stack = 0x00178000-0x0017a000
init = 0x0017a000-0x008c4000
available = 0x008c4000-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 100 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 [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 47796k/65536k RAM, (7464k 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 (36 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 93
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=19)@sclk=100MHz)
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-01 00:11:35 UTC (695)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 7464k freed
dma_alloc_init: dma_page @ 0x008c1000 - 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-12-15 16:04:18 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> vePHY: 0:01 - Link is Up - 100/Full
rsion
kernel: Linux release 2.6.28.10-ADI-2009R1.1-svn8001, build #6 Wed Dec 16 14:18:54 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-9271, build #3 Wed Dec 16 14:18:10 CST 2009
root:/> successful boot attempt
Starting test for UART ...
test@uclinux61-bf548-std:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> telnet 10.100.4.50
Trying 10.100.4.50...
Connected to 10.100.4.50.
Escape character is '^]'.
BusyBox v1.13.4 (2009-12-15 16:04:18 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/>
root:/> cat /proc/kallsyms > ccc
root:/> stty -F /dev/ttySS0 cs8 ispeed 57600 ospeed 57600 -icrnl -ixon igncr -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoke -hupcl -echoct
l min 1 time 0
root:/> cat /dev/ttySS0 > aaa
test@uclinux61-bf548-std:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> rcp root@10.100.4.50:/ccc .
test@uclinux61-bf548-std:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> stty -F /dev/ttyUSB0 cs8 ispeed 57600 ospeed 57600 -icrnl -ixon igncr -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoke -hupcl -echoctl min 1 time 0
test@uclinux61-bf548-std:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> cat ccc > /dev/ttyUSB0
test@uclinux61-bf548-std:~/work/cruise/checkouts/uclinux-dist/testsuites/serial> ^C
root:/>
root:/> Catted file is got on target.
diff -u ccc aaa
--- ccc Thu Jan 1 00:11:46 1970
+++ aaa Thu Jan 1 00:13:12 1970
@@ -1,26 +1,24 @@
00001000 T _do_one_initcall
00001000 T __stext
-00001000 T _text
+00001 00 T _text
00001000 T __text
00001164 t _run_init_process
0000117c t _init_post
00001250 T _name_to_dev_t
00001458 t _kernel_thread_helper
00001464 T _dump_fpu
-00001470 T _flush_thread
+00001470 T _fltsh_thread
0000147c T _copy_thread
000014c0 T _get_wchan
0000152c T _sys_execve
0000157c T _bfin_clone
000015ac T _kernel_thread
-0000161c T _bfin_vfork
-0000163c T _finish_atomic_sections
+0000161c T _bfin_vfork0000163c T _finish_atomic_sections
000017a8 T _ptrace_disable
000017c0 T _ptrace_enable
000017d8 T _syscall_trace
00001830 T _arch_ptrace
-00001d90 t _get_clkin_hz
-00001da0 t _get_vco
+00001d90 t _get_clkin_hz00001da0 t ^get_vco
00001de8 T _get_cclk
00001e7c t _c_start
00001eac t _c_next
@@ -28,7 +26,7 @@
00001ec8 T _get_sclk
00001f2c T _usecs_to_sclk
00001fa8 T _sclk_to_usecs
-00002004 t _show_cpuinfo
+00002004 t _shnw_cpuinfo
00002378 T _sys_sigaltstack
00002380 T _do_rt_sigreturn
00002bfc T _do_signal
Follow-ups
--- Sonic Zhang 2009-12-16 05:40:00
Sorry. But, it passed on my developing machine. Built by 2009R1.1-RC2
toolchain.
BusyBox v1.13.4 (2009-12-16 18:13:06 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> vPHY: 0:01 - Link is Up - 100/Full
ersion
kernel: Linux release 2.6.28.10-ADI-2009R1.1-svn8027, build #2 Wed Dec 16
18:15:47 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-9276, build #1 Wed Dec 16 18:14:40 CST 2009
root:/> spawn /bin/sh
eight:~/projects/uClinux-dist.2009R1/testsuites/serial # telnet 10.100.4.50
Trying 10.100.4.50...
Connected to 10.100.4.50.
Escape character is '^]'.
BusyBox v1.13.4 (2009-12-16 18:13:06 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/>
root:/> cat /proc/kallsyms > ccc
root:/> stty -F /dev/ttySS0 cs8 ispeed 57600 ospeed 57600 -icrnl -ixon igncr
-opost -onlcr -
isig -icanon -iexten -echo -echoe -echok -echoke -hupcl -echoctl min 1 time 0
root:/> cat /dev/ttySS0 > aaa
spawn /bin/sh
eight:~/projects/uClinux-dist.2009R1/testsuites/serial # rcp
root@10.100.4.50:/ccc .
eight:~/projects/uClinux-dist.2009R1/testsuites/serial # stty -F /dev/ttyUSB0
cs8 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.2009R1/testsuites/serial # cat ccc >
/dev/ttyUSB0
eight:~/projects/uClinux-dist.2009R1/testsuites/serial #
Still wait.
^C
root:/>
root:/> diff -u ccc aaa
root:/>
Case 1 ...PASS
stty -F /dev/ttySS0 cs8 ispeed 57600 ospeed 57600 -icrnl -ixon igncr -opost
-onlcr -
isig -icanon -iexten -echo -echoe -echok -echoke -hupcl -echoctl min 1 time 0
root:/> ls
.svn build_serial_uart_kernel_log
serial_uart_test.exp
build_serial_kernel.exp ccc
serial_uart_test_log
build_serial_uart_kernel.exp serial_test.exp
eight:~/projects/uClinux-dist.2009R1/testsuites/serial # stty -F /dev/ttyUSB0
cs8 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.2009R1/testsuites/serial # cat /dev/ttyUSB0 >
bbb
wait for receiving data...
cat ccc > /dev/ttySS0
root:/>
Still wait.
eight:~/projects/uClinux-dist.2009R1/testsuites/serial # diff -u ccc bbb
eight:~/projects/uClinux-dist.2009R1/testsuites/serial #
Case 2 ...PASS
*******************************************************************
STEP 3: Convert the console to the extend UART.
Try to figure out if we are in u-boot or the kernel
root:/> version
kernel: Linux release 2.6.28.10-ADI-2009R1.1-svn8027, build #2 Wed Dec 16
18:15:47 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-9276, build #1 Wed Dec 16 18:14:40 CST 2009
root:/> We are in the kernel
sending reboot
reboot
Restarting system.þ
U-Boot 2008.10-svn1445 (ADI-2009R1-pre) (Oct 30 2008 - 16:35:47)
CPU: ADSP bf537-0.2 (Detected Rev: 0.2)
Board: ADI BF537 stamp board
Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
RAM: 64 MB
RAM size is 64 MB.
Flash: 4 MB
In: serial
Out: serial
Err: serial
Net: Blackfin EMAC
MAC: 00:E0:22:FE:4F:4D
Hit any key to stop autoboot: 0
bfin> set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
ip=10.100.4.50 console=ttySS0,57600n8
bfin> set serverip 10.100.4.174
bfin> set ipaddr 10.100.4.50
bfin> save
Saving Environment to Flash...
. done
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
. done
Protected 1 sectors
bfin>
bfin> tftpboot 0x2000000 uImage
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'uImage'.
Load address: 0x2000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
##############################################################
done
Bytes transferred = 4724557 (48174d hex)
Image size is 48174d
bfin> run addip
bfin> bootm
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1.1-svn
Created: 2009-12-16 10:15:57 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4724493 Bytes = 4.5 MB
Load Address: 00001000
Entry Point: 00188888
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 00188888
Linux version 2.6.28.10-ADI-2009R1.1-svn8027 (root@eight) (gcc version 4.1.2
(ADI svn)) #2 Wed Dec 16 18:15:47 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-0x001051e0
rodata = 0x001051e0-0x00156450
bss = 0x00157000-0x00168720
data = 0x00168720-0x0017a000
stack = 0x00178000-0x0017a000
init = 0x0017a000-0x008c4000
available = 0x008c4000-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 100 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 console=ttySS0,57600n8
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 [ttySS0] enabled, bootconsole disabled
Reboot the linux kernel timeout!
(Back at eight.analog.com)
----------------------------------------------------
Linux Kermit>q
Closing /dev/ttyS0...OK
*******************************************************************
STEP 4: Start kermit.
spawn kermit
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
Linux Kermit>set line /dev/ttyUSB0
Linux Kermit>set speed 57600
/dev/ttyUSB0, 57600 bps
Linux Kermit>set carrier-watch off
Linux Kermit>set handshake none
Linux Kermit>set flow-control none
Linux Kermit>robust
Linux Kermit>set file type bin
Linux Kermit>set file name lit
Linux Kermit>set rec pack 1000
Linux Kermit>set send pack 1000
Linux Kermit>set window 5
Linux Kermit>set escape 129
Linux Kermit>connect
Connecting to /dev/ttyUSB0, speed 57600
Escape character: Code 129: enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
ls
bin etc init mnt root sys usr
dev home lib proc sbin tmp var
root:/>
Case 3 ...PASS
Ending ./serial_uart_test.exp
--- Mingquan Pan 2009-12-18 04:55:32
Change to use your serial cable, the data transition can be done smoothly as
well.
In order to use any serial cable, it needs switch the connection in testing:
ttyS0(host) with ttySS0(target), ttyUSB0(host) with ttyBF0(target). So close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found