⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto_lan9118_os20_stmicro.txt

📁 Lan9118以太网芯片linux驱动程序
💻 TXT
字号:
This document shows how to install the lan9118 driver for OS20/NEXGEN to work 
with a TV demo program supplied by STMicro. (stpvr2.zip)

In order to run the stpvr2 application you need:
a) STi 5516/17 Evaluation System
b) ST MICRO CONNECT (ICE)
c) Lan9118 daughter board for STmicro
d) stpvr2.zip (application)
e) STmicro C compiler
f) Lan9118 driver distribution from SMSC


1) HARDWARE SETUP
NOTE:  the instructions below related to network configuration are for the 
following case:
	1a.  There is a single Windows Host on an isolated Test LAN without 
		DHCP.
	1b. This single Host is used for everything:  as the build environment,
		to operate the ICE, and to act as a partner for the LAN9118.
	1c. To support this functionality, there are exactly 3 devices on this 
		isolated
	Test LAN, all connected by a hub:  the Windows Host, the ICE, and the 
		LAN9118.
	1d.  The following IP addresses are used:
		Windows Host	192.0.0.193
		ICE		192.0.0.110
		LAN9118		192.0.0.120

If your network configuration is different than the one defined above, then 
you will need to modify the cabling and IP address assignments in steps 
#1a, 1b, 1c and 11 below in whatever way(s) are appropriate for your particular
network configuration.

Detail instruction:

Insert the lan9118 board into the STMICRO 5517 evaluation board. Connect the 
LAN cable into a common hub.
Connect power to the STMICRO evaluation unit.
Take the STMICRO CONNECT unit, the emulator, connect power to it.
Connect the Ethernet connection to the same common hub.
Connect the ribbon cable from the emulator to the DCU port of the STMICRO 
evaluation unit.
Connect an Ethernet cable from the HOST pc to the same common hub.
Connect the serial ports between the HOST pc and the emulator.
Setting for serial port should be 9600 8N1.

2) Setup the IP addresses to form a private LAN
Set the IP address of the HOST Windows PC to 192.0.0.193. This address should 
match line 6 of file c:\stpvr2\stapp\configant.c.
Also in this file, modify CONFuseDHCP=0;, modify CONFipaddr[] to 192.0.0.120. 
This is the IP address of the LAN9118 daughter card.
Open a terminal session on the Windows HOST pc. Configure the emulator抯 IP 
address to 192.0.0.110. Type help to see how to do it.

3) Modify file c:\stpvr2\stapp\hw.cfg
Go to the end of this file and comment out all target statement, e.g. do 
##target .. Insert the following line:

Target sti551Xhtiusb tap jei 192.0.0.110 tckdiv=8 sti551Xdef

This will instruction the host tools running on pc to talk to the emulator.

4) copy the Lan9118 driver source code into c:\stpvr2\ip\drivers\stethernet 
directory. They are stethernet118.c, lan9118.c, lan9118.h

5) edit the file c:\stpvr2\ip\tests\ngsetup.c. Line 75, change 
ngNetDrv_xxxx to ngNetDrv_smsclan9118. Line 138, change the same thing.

6) edit the file c:\stpvr2\ip\include\Fresco\drivers\db558a_stem.h. 
Line 15, change the same thing as (5)

7) edit file c:\stpvr2\ip\iplib.lbb. Delete line 9. Then add this line:
file iplib.dir/stethernet118.tco

8) edit the file c:\stpvr2\ip\makefile.
Line 40, Delete line with stethernet... Then add this line:
iplib.dir/stethernet118.tco	\

Line 58, comment out the line that compiles stethernet.tco. And add lines 
that compiles stethernet118.tco. This makefile is included together with this
driver distribution.

9) edit the file c:\stpvr2\bin\setenv.bat. Go to line 240, then set the path
name for STmicro C compiler. The original shows version 1.9.6. The version we
get is 2.0.5.

10) go to c:\stpvr2 and double click on the shortcut STPVRsetup. This will 
open a DOS Windows. Type:
>gmake purge_ip
>gmake all
>go

11) PING TEST
From the same DOS window, which is now the target console window, you can 
ping the HOST PC

ping "192.0.0.193"

From the host PC, you can ping the LAN9118. Open a regular DOS window and type

ping 192.0.0.120
That is all!

12) Notes on SmartBits test
We run the whole SmartBits test suite with various packet sizes and all link speeds.
All the tests passed, except for the dribble bit error test.

We used to have the same dribble bit error test failed on NexGen version 1.4.
The fix is to increase the buffer pool size from 64K bytes to 1M bytes, and increase
queue depth of both incoming and outgoing queues from 8 to 256. This fixes the problem.

We tried the same fix with this distribution, but it didn't work. 
Since the source code for NexGen IP stack version 1.3 is not available with this
distribution, no further debugging can be done.

By setting up dribble bit error test alone, it passes.
By setting up A) CRC error test followed by C) dribble test, dribble test passes.
By setting up B) Unalignment test followed by C) dribble test, dribble test passes.
But setting up A) CRC error test followed by B) Unalignment test followed by
	C) dribble test, the dribble test fails.

13) all modified files are supplied together with the driver under the driver's sub-directory.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -