Readme.txt Driver File Contents (NDIS4_CEv4.x_V100.zip)

  This file describes the steps to build the CS8900A NDIS 4 Driver for 
  Windows CE 4.x.

=================================================================================
======================  Defines Used in Compiler  ===============================
=================================================================================

The following defines can be used in the sources file.

1. ARM_PROCESSOR

  If your processor type is ARM or Strong ARM, ARM_PROCESSOR must be
  defined in the sources file.  For example:
  CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DARM_PROCESSOR 


2. SH3_PROCESSOR

  If your processor type is SH3 or SH4, SH3_PROCESSOR must be 
  defined in the sources file.  For example:

  CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER  -DSH3_PROCESSOR 

The default C_DEFINES used in the sources file is 
C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER.

For Network Card without EEPROM: User can assign the default values in the
AssignedUserDefinedConfig() function in the cs8900a.c file.



=================================================================================
============    Build the CS8900 NDIS DLL Lib for WinCE 4.x   ===================
=================================================================================

If your WinCE version is 4.x:

1. Got to the directory \WinCE_Directory\Public\Common\Oak\Drivers\NetCard
2. Make a subdirectory CS8900
3. Copy the source files to the CS8900 directory.
4. Edit the file, Sources, to set the compiler flag options as described above.
6. Start the CE Platform Builder then click File -> Open Workspace.  
   Select your Platform.
8. Add CS8900.cec to Catalog:
   Click File -> Manage Platform Builder Component -> Import new.
   Go to \WinCE_Directory\Public\Common\Oak\Drivers\NetCard\CS8900
   and select CS8900.cec.
9. Click View -> Catalog. The CS8900Ethernet component is in
   the \Device Drivers\Netcard directory.
10. Add CS8900Ethernet to your platform:
    Click CS8900_Ethernet in Catalog then click Platform -> Insert
	-> Selected Catalog Component.
12. Modify Project.bib.  Add the following line to Project.bib in the
    MODULES segment:
	   cs8900a.dll       $(_FLATRELEASEDIR)\cs8900a.dll  NK  SH
13. Modify your Project.reg. Please read the segment "CS8900A DLL Example
    for WinCE Registry" in this file.
14. The step is optional. Build the CS8900A Dll driver cs8900a.dll:
    Click View -> Workspace -> Platform -> Component -> CS8900_Ethernet.
    Click Build -> Build Selected Components.
    The output cs8900a.dll will reside in 
    \WinCE_Directory\Platform\YourPlatform\target\YourCpuType\YourCpuSubType\CE\Debug
15. Build the nk.bin image for downloading:
    Click Build -> Rebuild Platform,
	then Build -> Make Image.



=================================================================================
================== CS8900A DLL Example for WinCE Registry ===================
=================================================================================

The following is an example to include CS8900A.dll in the WinCE registry.
Add the following segment to the Project.reg file for WinCE to load 
CS8900A.dll when booting.

In the segment [HKEY_LOCAL_MACHINE\Comm\CS8900A1\Parms],
the Ethernet Physical Address stored in EEPROM can be overridden by the
MACAddress entry, and the Duplex Mode can be specified by the DuplexMode entry.

; @CESYSGEN IF CE_MODULES_CS8900A
[HKEY_LOCAL_MACHINE\Comm\CS8900A]
   "DisplayName"="CS8900 Ethernet Driver"
   "Group"="NDIS"
   "ImagePath"="CS8900A.dll"

[HKEY_LOCAL_MACHINE\Comm\CS8900A\Linkage]
   "Route"=multi_sz:"CS8900A1"

[HKEY_LOCAL_MACHINE\Comm\CS8900A1]
   "DisplayName"="CS8900 Ethernet Driver"
   "Group"="NDIS"
   "ImagePath"="CS8900A.dll"

[HKEY_LOCAL_MACHINE\Comm\CS8900A1\Parms]
   ; BusNumber=0 and BusType=1 are proper for ix86 ISA bus.
   ; Change the entries depend on your hardware.
   ; Do NOT delete BusNumber or BusType, otherwise CS8900A.dll won't be loaded.
   "BusNumber"=dword:0
   "BusType"=dword:1
   ; DuplexMode: 0:AutoDetect; 1:HalfDuplex; 2:FullDuplex.
   "DuplexMode"=dword:1
   ; The Ethernet Physical Address. For example,
   ; Ethernet Address 00:24:20:10:bf:03 is MACAddress1=0024,
   ; MACAddress2=2010,and MACAddress3=bf03.
   ; MACAddress=0000:0000:0000 means to read it from EEPROM.
   "MACAddress1"=dword:0000
   "MACAddress2"=dword:0000
   "MACAddress3"=dword:0000


; @CESYSGEN ENDIF CE_MODULES_CS8900A



=================================================================================
=============       Required Modifications for SH3 or SH4        ================
=================================================================================

The CS8900 WinCE driver supports only the IO mode. The SH3's address lines should be 
connected to CS8900 in a special way to enable IO mode on CS8900.  Thus, the SH3's
address lines become  CS8900's IO port lines.

First, SH3_PROCESSOR must be defined in the sources file:

CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DSH3_PROCESSOR 


Second, change the values of CS8900_INTERRUPT_REQUEST_PIN_NUM and 
CS8900_IOPORT_MEM_ADDR in cshrd.h. 

The CS8900 has four interrupt request output pins that can be connected directly 
to Processor. Only one interrupt output pin is connected to SH3. 
CS8900_INTERRUPT_PIN_NUM defines which interrupt pin is used.
 0:  INTRQ0
 1:  INTRQ1
 2:  INTRQ2
 3:  INTRQ3
#define CS8900_INTERRUPT_REQUEST_PIN_NUM     0 /* or other number: 0-3 */

For SH3, CS8900_IOPORT_MEM_ADDR is the physical memory address of the CS8900 IO 
port according to your target board:

#define CS8900_IOPORT_MEM_ADDR     0x????????L


Third, you need to modify WinCE's kernel to hook up the Ethernet Interrupt to the
SH3 processor. Please read WinCE's on-line help first to get some ISR ideas.  For
WinCE 4.0, the ISR information is in

Operating System Development -> Designing Operating System Elements -> Creating an OEM Adaptation Layer
-> Enhancing OAL Functionality -> Implementing an ISR


The following instructions will give you ideas how to modify the 
WinCE kernel. 

****** Note: Must Read!!!!!!!!!!! ******** 
The following description is based on CE 3.x.  So, it just give
you the ideas but not the exact way for CE 4.x.
 
The following steps describes what to do to hookup IRQ2 to its service routine:
 
1) In OEMInit( ) function in platform\YourPlatform\kernel\HAL\cfwp2.c (or other files), add
   {
     // Set Priority 4 to Ether_ISR, but you can choose different
       priority based on your platform.
       HookInterrupt(4, Ether_ISR);
   }

2) In OEMInterruptEnable/Disable/Done() functions in cfwp2.c, add
   {
    case SYSINTR_ETHER: /*It may not work for your processor.  Please find out the
     way to disable and enable the Ethernet interrupt. */
    _REGW (IPRC) = (_REGW(IPRC) & ETHERNET_IPRC_IRQ2_MASK)|ETHERNET_IPRC_IRQ2_INT;

    // for disable function it will be
    //_REGW (IPRC) = (_REGW(IPRC) & ETHERNET_IPRC_IRQ2_MASK);
    break;
   }

3) Create an ISR routine Ether_ISR in the "fwp2.src" file
   under .\Hal\Shx directory.

  .export _Ether_ISR
  LEAF_ENTRY _Ether_ISR
  mov.l #IPRC,R6 ; Interrupt priority register
  C (IPRC)
  mov.w @R6,R0
  mov.l #IPRC_IRQ2_MASK,R1 ;
  and R1,R0 ; Set IRQ2 to priority 0
  mov.w R0,@R6 ; Mask IRQ2
  ;
  mov.l #IRR0,R6 ; Interrupt request register 0
  (IRR0)
  mov.b @R6,R0
  mov #(~IRR0_IRQ2R & 0xFF),R0 ; Clear IRQ2 interrupt flag
  and R1,R0 ;
  mov.b R0,@R6 ;
  rts
  mov #SYSINTR_ETHER, r0

4) Put "SYSINTR_ETHER" in both "OALintr.h" and "OALintr.inc" files.

  SYSINTR_ETHER: SYSINTR_FIRMWARE+10
  SYSINTR_ETHER: .equ SYSINTR_FIRMWARE+10

  They are the interrupt IDs used by the CE kernel. SYSINTR_ETHER is independent from 
  the interrupt line connection between Processor and MAC.

5) If you can not use SYSINTR_ETHER = SYSINTR_FIRMWARE+10, and would like to define
   your own value, make sure your define isn't conflict with other interrupts.

   Assume the followings are the new defines:
    
   SYSINTR_ETHER: SYSINTR_FIRMWARE+??
   SYSINTR_ETHER: .equ SYSINTR_FIRMWARE+??

   In CrystalInitialize() in CS8900A.c, change one line from:

   #if ( defined(ARM_PROCESSOR) || defined(SH3_PROCESSOR))
	  /* Since SYSINTR_ETHER = SYSINTR_FIRMWARE+10 defined in OALint.h, 
	     pChip->Config.IntLine must be 10 here for CE kernel to map CS8900 ISR
	     to SYSINTR_ETHER. */
      pChip->Config.IntLine = 10; //Change this line only.
 
   to:

    pChip->Config.IntLine = ?? ; //SYSINTR_ETHER - SYSINTR_FIRMWARE
 


=================================================================================
===============         Required Modifications for ARM           ================
=================================================================================

The CS8900 WinCE driver supports only the IO mode. The ARM's address lines should be 
connected to CS8900 in a special way to enable IO mode on CS8900.  Thus, the ARM's
address lines become  CS8900's IO port lines. 

First, ARM_PROCESSOR must be defined in the sources file:
CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER  -DARM_PROCESSOR 

Second, change the values of CS8900_INTERRUPT_REQUEST_PIN_NUM and 
CS8900_IOPORT_MEM_ADDR in cshrd.h. 

The CS8900 has four interrupt request output pins that can be connected directly 
to Processor. Only one interrupt output pin is connected to ARM.
CS8900_INTERRUPT_PIN_NUM defines which interrupt pin is used.
 0:  INTRQ0
 1:  INTRQ1
 2:  INTRQ2
 3:  INTRQ3
#define CS8900_INTERRUPT_REQUEST_PIN_NUM     0 /* or other number: 0-3 */

For ARM and Strong ARM, CS8900_IOPORT_MEM_ADDR is the un-buffered & un-cashed 
virtual address(range 0xA0000000-0xBFFFFFFF). Its buffered & cashed virtual address 
(ragne 0x80000000-0x9FFFFFFF) should be defined in OEMAddressTable.

#define CS8900_IOPORT_MEM_ADDR     0x????????L


Third, you need to modify WinCE's kernel to hook up the Ethernet Interrupt to the
ARM processor.  Please read WinCE's on-line help first to get some ISR ideas.  For
WinCE 3.0, the ISR information is in

Operating System Development -> Designing Operating System Elements -> Creating an OEM Adaptation Layer
-> Enhancing OAL Functionality -> Implementing an ISR

The following instructions will give you ideas how to modify the 
WinCE kernel.

****** Note: Must Read!!!!!!!!!!! ******** 
The following description is based on CE 3.x.  So, it just give
you the ideas but not the exact way for CE 4.x.
 
1) In OEMInterruptEnable/Disable/Done() functions in 
   platform\YourPlatform\kernel\HAL\cfwsarm.c (or other files), modify the code to enable and
   disable the Ethernet interrupt according to your target board:

   {
    case SYSINTR_ETHER: /*It may not work for your processor.  Please find out the
     way to disable and enable the Ethernet interrupt. */
     _REGW(IPRC) = (_REGW(IPRC) & ETHERNET_IPRC_IRQ2_MASK)|ETHERNET_IPRC_IRQ2_INT;

     // for disable function it will be
     //_REGW (IPRC) = (_REGW(IPRC) & ETHERNET_IPRC_IRQ2_MASK);
     break;
    }


2) Put "SYSINTR_ETHER" in both "OALintr.h" and "OALintr.inc" files.

   SYSINTR_ETHER: SYSINTR_FIRMWARE+10
   SYSINTR_ETHER: .equ SYSINTR_FIRMWARE+10

   They are the interrupt IDs used by the CE kernel. SYSINTR_ETHER is independent from 
   the interrupt line connection between Processor and MAC.


3) If you can not use SYSINTR_ETHER = SYSINTR_FIRMWARE+10, and would like to define
   your own value, make sure your define isn't conflict with other interrupts.

   Assume the followings are the new defines:
    
   SYSINTR_ETHER: SYSINTR_FIRMWARE+??
   SYSINTR_ETHER: .equ SYSINTR_FIRMWARE+??

   In CrystalInitialize() in CS8900A.c, change one line from:

   #if ( defined(ARM_PROCESSOR) || defined(SH3_PROCESSOR))
	  /* Since SYSINTR_ETHER = SYSINTR_FIRMWARE+10 defined in OALint.h, 
	     pChip->Config.IntLine must be 10 here for CE kernel to map CS8900 ISR
	     to SYSINTR_ETHER. */
      pChip->Config.IntLine = 10; //Change this line only.
 
   to:

    pChip->Config.IntLine = ?? ; //SYSINTR_ETHER - SYSINTR_FIRMWARE
 
 
4) If your ARM type is SA1110, ARM920, or ARM720, look at INT1110.c, INT920.c, or INT720O.c
   in the .\HAL\ARM directory respectively. Modify the following code segment in 
   EMInterruptHandler() so  ArmInterruptHandler() can be correctly called when Interrupts
   are coming.
     
  The following code is extracted from SA1110.c. It needs modifications to
  correctly read and write interrupt registers
		  .
	  } else if(my_sa1100_intreg & GPIO_1) {
      	//Clear the GPIO interrupt
		sa1100_gpio->gedr = GPIO_1;
	    
        //
        // For SA1100, we allow the system tick only to interrupt any of the 
        // Odo FPGA interrupt handlers. This is to show the use of nested 
        // interrupts on ARM.
        //
        dwSavedICMR = sa1100_int_ctlr->icmr;
		sa1100_int_ctlr->icmr = OS_TIMER0;
        INTERRUPTS_ON();
        
        // Call common FPGA interrupt handler code with TIMER interrupt enabled.
	    dwRet = ArmInterruptHandler();
        
        INTERRUPTS_OFF();
		sa1100_int_ctlr->icmr = dwSavedICMR;
        
	    return dwRet;
    }


5) Modify the code segment in ArmInterruptHandler() in the .\HAL\ARM\ARMint.c:

    else if ( (my_odo_isr_reg & odo_etherIntr) != 0 )
    {
        // mask the debug Ethernet interrupt
        odo_cpu->odo_cpuMr &= ~odo_etherIntr;
        GOTO_EXIT(SYSINTR_ETHER);
    }
 
    so it can properly determine if there is an Ethernet Interrupt. If yes, then 
	clear the Ethernet Interrupt mask or do nothing depending on your target board.
	GOTO_EXIT(SYSINTR_ETHER) must be called if there is an Ethernet Interrupt.


6) Since WinCE's ISR can process only one Interrupt at a time, 
   modify the code segment in ArmInterruptHandler() in the .\HAL\ARM\ARMint.c:

EXIT: 
    //
    // Since all of the FPGA interrupts are multiplexed on one signal to the CPU
    // we need to be careful when multiple interrupts are pending. We have
    // cleared the interrupt at the CPU early on. If there's another interrupt
    // that needs processing, we need to force a new interrupt. We do this by
    // clearing the cpuMr register and reinstating it.
    //
    wMrTemp = odo_cpu->odo_cpuMr;
    odo_cpu->odo_cpuMr = 0x0000;
    odo_cpu->odo_cpuMr = wMrTemp;
    return (iRet);

    according to your target board so the pending interrupts can be processed 
	next time.
Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: web2, load: 0.28