PRELIMINARY
MX98715BEC
APPLICATION NOTE
1. INTRODUCTION
The purpose of this application note is to describe the implementation of a PCI bus master 100 Base-TX Fast Ethernet node using MXIC’ highly integrated single chip Fast Ethernet NIC controller MX98715BEC. In details, this document presents product overview, programming guide, hardware design and layout recommendations that can help you to quickly and smoothly implement a Fast Ethernet adapter card. As you can find in the MX98715BEC driver diskette, MXIC already provideds a complete set of high quality drivers for easier and more efficient way to interface with MX98715BEC on the most popular Network Operating Systems. Nevertheless, there are still some special applications or environment not covered in the MX98715BEC driver diskette. Driver developers, however, could still refer to the section of driver programming guide to accomplish the required driver. It is recommended that you should be familiar with the MX98715BEC data sheet before reading this guide. The MX98715BEC highly integrates with direct PCI bus interface, including PCI bus master with DMA channel capability, direct EEPROM as well as Boot ROM interface, and large on chip transmit/receive FIFOs. Also, the MX98715BEC is equipped with intelligent IEEE802.3u-compliant Nway auto-negotiation capability allowing a single RJ-45 connector to link with the other IEEE802.3u-compliant device without re-configuration. To optimize operating bandwidth, network data integrity and throughput, the proprietary Adaptive Network Throughput Control (ANTC) function is implemented. For detailed product specification information, please refer to the MX98715BEC data sheet.
3. HARDWARE DESIGN CONSIDERATIONS
3.1 SYSTEM APPLICATION BLOCK DIAGRAM A system block diagram for the MX98715BEC based Fast Ethernet adapter card is shown as following:
2. PRODUCT OVERVIEW
The MX98715BEC implements the 10/100Mbps MAC layer and Physical layer on a single chip in accordance with the IEEE 802.3 standard.
PCI Bus
Boot ROM
Osc or Crystal 25MHz
MX98715BEC
LED
EEPROM
Magnetic
RJ45
Fig. 1
P/N:PM0706
REV. 0.2, NOV. 30, 2000
1
MX98715BEC
3.2 PCI CONNECTION The MX98715BEC provides direct PCI bus interface to PCI connector. Board designers should especially take care of the four pins of TDI,TDO,PRSNT1# & PRSNT2# that are only related to PCI bus connector. Boards that do not implement JTAG Boundary Scan should tight TDI and TDO together to prevent the scan chain from being broken. Both pins PRSNT1# and PRSNT2# should be connected to ground indicating that the board physically exists in a PCI slot and provids information about the total power requirements ( less than 7.5W ) of the board. 3.3 OSCILLATOR OR CRYSTAL The MX98715BEC is designed to operate with a 25MHz oscillator or crystal module. The clock specification of this oscillator should meet 25MHz +/- 50PPM. 3.4 BOOT ROM The MX98715BEC support a direct boot ROM interface allowing diskless workstations to remotely download operating system from network server. For proper operation, the access time of adapt EPROM should not exceed 240ns. 3.5 SERIAL EEPROM The MX98715BEC provides pins EECS,BPA0 (EECK), BPA1 (EEDI) and BPD0 (EEDO) for directly accessing the serial EEPROM. BPA0-1 and BPD0 serve as SK (EECK), DI (EEDI) and DO (EEDO) respectively. The contents of the EEPROM includes the ID information of the MX98715BEC (VendorID, DeviceID, Sub-vendorID, Sub-deviceID and MAC ID), and the configuration parameters for software driver. The EEPROM contents should be programmed according to MXIC's definition as mentioned in Appendix A. Detailed software programming example is described in section 4.5. 3.6 PROGRAMMABLE LED SUPPORT The MX98715BEC provides five pins LED[0:4] to control display LEDs. Displayed messages are programmable through setting CSR9 bits[31:28] & bit24. The maximum sinking current of these output pins is 16mA. Current limiting resistor (560 ohm) should be added to ensure proper operation. The following indicates the configuration setting table for LED display programming. CSR 9 LED 4 0 Colision 1 PMEB CSR 9 LED 0 CSR 9 LED 1 CSR 9 LED 2 CSR 9 LED 3 0 Activity 0 Good Link 0 Link Speed 0 Receive 1 Link speed 1 Link Activity 1 Colision 1 F/H duplex
3.7 NETWORK INTERFACE TO MAGNETIC COMPONENT For isolating and impedance matching purpose, an isolating transformer with 1:1 transmit and 1:1 receive turns ratio is required for transmit and receive twisted pair interface. In Appendix B, several transformers that we had verified successfully with MX98715BEC are listed for quick reference purpose. 3.8 OPTIMIZED EQUALIZER COMPONENTS MXIC’ Fast Ethernet solution utilizes adaptive equalizer to compensate the attenuation and phase distortion induced by different lengths of cable. To optimize transmit and receive signal quality, pins RTX should be connected to external resistors 1K ohm (±1%) and then to ground respectively. 3.9 Remote-Power-On and ACPI application MX98715BEC fully supports Remote-Power-ON and ACPI spec that meet PC99 requirement for powersensitive applications. It accepts the following wake-up events in the power-down mode. * Reception of a Magic Packet. * Reception of a Network wake-up frame. * Detection of change in the network link state. To put MX98715BEC into the sleep mode and enable the wake-up events detection are done as following:
P/N:PM0706
REV. 0.2, NOV. 30, 2000
2
MX98715BEC
(struct TX_RESOURCE *)((((unsigned int)tx_temp[i])+4)&
1. Write 1 to PPMCSR [8] to enable power management feature. 2. Write the value to PPMCSR [1:0] to determine which power state to enter. If D1, D2 or D3hot state is set, the PC is still turned on and is commonly called entering the Remote Wake-up mode. Otherwise if the main power on a PC is totally shut off, we call that it is in the D3cold state or Remote Power-On mode. To sustain the operation of the Lancard, a 5V standby power is required. Once the PC is turned on, MX98715BEC loads the magic ID from EEPROM and sets it up automatically. No register is needed to be programmed. After then, simply turn off PC to enter D3cold state. In either Remote Wake-up mode or Remote PowerOn mode, the transceiver and the RX block are still alive to monitor the network activity. If one of the three wakeup events occured, the following status is changed: 1. PPMCSR [15] (PME status) is set to 1. 2. CRS5 [28] (WKUPI) is set to 1. 3. PCI interrupt pin INTA# is asserted low. 4. LANWAKE pin is asserted high.
0xfffc); } for (i=0; iownership=0x00; tx_resource[i]->tstatus=0x0000; tx_resource[i]->tdes0_unused=0x00; /* fill buffer_1_address tdes2 */ get_ea((void far *)(tx_resource[i]->tx_buffer_data), &physicaladdress); tx_resource[i]->buff_1_addr=physicaladdress; /* fill buffer_2_address tdes3 */ if (i==NumTXBuffers-1) j=0; else j=i+1; get_ea((void far *)(tx_resource[j], &physicaladdress); tx_resource[i]->buff_2_addr=physicaladdress; } } initializeTheReceiveRing() { unsigned int i,j; unsigned long physicaladdress; for (i=0; ibuff_1_addr=physicaladdress; /* fill buffer_2_address rdes3 */ if (i==NumRXBuffers-1) j=0; else j=i+1; get_ea((void far *)(rx_resource[j], &physicaladdress); for (i=0; iframe_length=RDES0_OWN_BIT; rx_resource[i]->rstatus=0x0000; /* fill rdes1 */ rx_resource[i]->command=RDES1_BUFFRX_BUFFER_SIZE+rxpkt_size[i];
P/N:PM0706
REV. 0.2, NOV. 30, 2000
3
MX98715BEC
rx_resource[i]->buff_2_addr=physicaladdress; } } initialize() { unsigned long physicaladdress; NIC_read_reg(&csr6); NIC_write_reg(&csr6,csr6.value&(~(CSR6_SR|CSR6_ST))); delay(200) : //wait TX&RX to enter stop state, or you can //check bit17~bit19 (RX state) & bit 20~bit21 (TX state) in //CSR5 to assure this condition. InitializeTheTransmitRing (6); InitializeTheReceiveRing (6); NIC_write_reg(&csr0,CSR0_L_SWR); delay(50); NIC_write_reg(&csr0,csr0shadow); //CSR0 shadow=0xFE58A000 get_ea((void far *)rx_resource[0],&physicaladdress); NIC_write_reg(&csr3,physicaladdress); get_ea((void far *)tx_resource[0],&physicaladdress); NIC_write_reg(&csr4,physicaladdress); NIC_write_reg(&csr7,csr7shadow); //csr7shadow=9xE7FFa06D NIC_write_reg(&csr16,csr16shadow); //csr16shadow=0x0B2C000 //Clear status register NIC_write_reg(&csr5,(unsigned long)0xffffffff); NIC_write_reg(&csr6,csr6shadow); //csr6shadow=0x01A8E202 setup_frame(TDES1_SETUP_LAST,perfect); //Initialize CAM to accept self-address/broadcost address //fromes } NIC_write_reg(&csr0,csr0.value|0x020000); tx_pointer=tx_resource[0]; j=0; editmode=1; //TAP=01
while (editmode) { if ((tx_pointer->ownership & 0x80)==0) { j++; j%=tx_pkt_num; if (tx_pointer->command & TDES1_LS_BIT) tx_error_detect(tx_pointer->tstatus); tx_pointer->ownership |= 0x80; tx_pointer=tx_resource[j]; } if (kbhit()) { keycode_get(); if (M_code!=0) { switch (M_code) { case 0x1b: // ESC: quit editmode=0; break; case 0x20: NIC_read_reg(&csr6); NIC_write_reg(&csr6,csr6.value^CSR6_ST); break default: break; } } } } }
4.3 RECEPTION MODULE
bmrx() { unsigned char editmode,i,j; unsigned long physicaladdress; struct RX_RESOURCE *rcv_pointer; initialize(); rcv_pointer=rx_resource[0]; j=0; editmode=1; while (editmode) { // if data received
4.2 TRANSMISSION MODULE
bmtx() { unsigned char editmode, j; struct TX_RESOURCE *tx_pointer; initialize(); fill_pattern(6); //fill pattern NIC_write_reg(&csr6,csr6.value&(~CSR6_ST)); //stop NIC_read_reg(&csr6); NIC_write_reg(&csr6,csr6.value|CSR6_SF); //store and forward NIC_read_reg(&csr0)
P/N:PM0706
REV. 0.2, NOV. 30, 2000
4
MX98715BEC
if ((rcv_pointer->frame_length & 0x8000)==0) { j++; j%=6; if (rcv_pointer->rstatus & RDES0_LS) rx_error_detect(rcv_pointer->rstatus); rcv_pointer->frame_length |= 0x8000; rcv_pointer=rx_resource[j]; } if (kbhit()) { keycode_get(); if (M_code!=0) { switch (M_code) { case 0x1b: // ESC: quit editmode=0; break; default: break; } } } } }
4.5 EEPROM ACCESSING The following is a reference code for accessing the contents of EEPROM that stores ID information and node configuration for the MX98715BEC.
/************************************* * Read all content from EEPROM **************************************/ eeprom_read() { unsigned int i, address, eeval; char bit; for (address=0; address(5-i)) & 0x01) ? 1:0; eeprom_serial_in(bit); } eeval=0; for(i=0; i>3)8) & 0x0ff; } } /************************************* * Write a word to EEPROM **************************************/ eeprom_write(unsigned int address, unsigned int data) { unsigned int i; char bit; eeprom_wen(); NIC_write_reg(&csr9,(unsigned long)0x04800); eeprom_serial_in(0); eeprom_serial_in(1); //command eeprom_serial_in(0); eeprom_serial_in(1);
4.4 SPECIAL CODING of MX98715BEC 4.4.1 SPEED SELECTION Speed selection for MX98715BEC is controlled by internal Nway registers. The Internal NWay registers are removed and protocol selection is controlled by Operation Mode Register (CSR6) and 10Base-T Control Register (CSR14)
NWay Active 100F CSR6_PS CSR6_PCS CSR6_FD 0 X 1 1 1 1 0 100H 1 1 0 0 10F 0 X 1 0 10H 0 X 0 0
CSR14_ANE 1
4.4.2 REGISTERS SETTING FOR DEVELOPING YOUR OWN DRIVER The contents of CSR16 for MXIC 10/100Base NIC controllers should be set differently as follow: MX98715BEC = 0x0b2cXXXX Meanwhile, you could directly access the Nway autonegotiation status from CSR20. Detailed format information please refer to MX98715BEC data sheet.
P/N:PM0706
REV. 0.2, NOV. 30, 2000
5
MX98715BEC
for(i=0; i>(5-i)) & 0x01) ? 1:0; eeprom_serial_in(bit); } for(i=0; i>(15-i)) & 0x01) ? 1:0; eeprom_serial_in(bit); } NIC_write_reg(&csr9,(unsigned long)0x04800); NIC_write_reg(&csr9,(unsigned long)0x04801); i=0; do{ i++; NIC_read_reg(&csr9); } while ((!(csr9.value & 0x08)) && (i1MHz 18pF Max 0.9W Max per winding not less than 1GW @ 2000V rms 2000V rms Min @ 60Hz for 1 min 3ns Min 4ns Max -1.1 dB Max 38 dB Min -38 dB Max Part No ST6118 (PT4171S) PE68515 S558-5999-15 LF8200 HSIP-002
2.CRYSTAL A. BASIC ELECTRICAL SPECIFICATION
CL=((C1*C2)/(C1+C2))+CIC+ C, Rd 100 ohm, R 1M ohm
CL=Crystal's external load capacitor Specified by crystal's specification CIC=MX98715BEC internal capacitor, C=PCB's stray capacitance Assume C1=C2=CExt, CL=1/2CExt + 7pf + 3pf if CL=20pf, than CExt=C1=C2=20pf.
P/N:PM0706
IC
7pF
R
Rd
C=3pf,
C1
C2
REV. 0.2, NOV. 30, 2000
13
MX98715BEC
B. CRYSTAL REFERENCE VENDORS SPK 25MHz±50PPM NDK JEN JAAN ENTERPRISE
3. SPECIAL REQUIREMENT ON RESISTORS & BEAD
Resistors for RTX=1K ohm ± 1% Ferrite Bead maximum current capacity for analog Vdd > 300mA Ferrite Bead maximum current capacity for Receive Region Vdd > 100mA
P/N:PM0706
REV. 0.2, NOV. 30, 2000
14
MX98715BEC
REVISION HISTORY REVISION
0.0 0.1 0.2
DESCRIPTION
modify PCB recommendation modify analog region receive region & fig.2 modify special requirement on resistors & bead
PAGE
P7 P10 P14
DATE
MAR/27/2000 JUL/11/2000 NOV/30/2000
P/N:PM0706
REV. 0.2, NOV. 30, 2000
15
MX98715BEC
TOP SIDE MARKING MX98715BEC line 1 : MX98715B is MXIC parts No. "E" : PQFP "C" : commercial grade line 2 : Assembly Date Code. line 3 : Wafer Lot No. line 4 : State
C9930 TA777001 TAIWAN
MACRONIX INTERNATIONAL CO., LTD.
HEADQUARTERS:
TEL:+886-3-578-6688 FAX:+886-3-578-2888
EUROPE OFFICE:
TEL:+32-2-456-8020 FAX:+32-2-456-8021
JAPAN OFFICE:
TEL:+81-44-246-9100 FAX:+81-44-246-9105
SINGAPORE OFFICE:
TEL:+65-347-8385 FAX:+65-348-8096
TAIPEI OFFICE:
TEL:+886-2-2509-3300 FAX:+886-2-2509-2200
MACRONIX AMERICA, INC.
TEL:+1-408-453-8088 FAX:+1-408-453-8488
CHICAGO OFFICE:
TEL:+1-847-963-1900 FAX:+1-847-963-1909
http : //www.macronix.com
MACRONIX INTERNATIONAL CO., LTD. reserves the right to change product and specifications without notice.
16