background image

Z183 EMAC Board
User Manual

8

UM008301-0401

Device Driver and Application Interface Routines

extern int Init8900(char *ieeeaddr, void (*rxnotify)(), void (*txnotify)(), uint
*intrvec);

The Ethernet driver is initialized by a calling the Init8900() function.

ieeeaddr is a 6-byte (or 3-word) array that contains the unique 48-bit MAC
address assigned to the Ethernet add-on adapter.

void rxnotify (uint i) is a user function that is called at interrupt time to
indicate the arrival of a frame that meets the receive filter criteria you have
set (see SetRxFilter()). The pointer to this function is passed at initialization.
You must code the logic that involves receiving the frame contents into a
buffer using the ReceivePkt function, as well as doing any inbound buffer
chain management that may be required. The argument “i” available to your
code is a bit mask indicating the receive error/conditions applicable to the
frame that you can now retrieve using a ReceivePkt( ) call. The BIT_RXOK
condition bit is set for a good frame with no errors.

void txnotify (uint i) is a user function that is invoked at interrupt time to
indicate the completion of a previously issued transmit frame operation (see
TransmitPkt( )). The pointer to this user function is passed at initialization.
You can examine the argument “i” as a bitfield that indicates the event bits
pertaining to the transmit done.

This user function may also call TransmitPkt( ) to issue another frame for
transmission.

Note: All code in this function would run at interrupt time. Pay attention to stack usage, shared variables,

event posting, etc.

Note: All code in this function would run at interrupt time. Pay attention to stack usage, shared variables,

event posting, etc.

Содержание Z183 EMAC

Страница 1: ...RS 910 E HAMILTON AVENUE CAMPBELL CA 95008 USA PHONE 1 408 558 8500 FAX 1 408 558 8300 WWW ZILOG COM User Manual Revision 1 UM008301 0401 10 Base T Ethernet Media Access Controller Add On Board for th...

Страница 2: ...described is intended to suggest possible uses and may be superseded ZiLOG INC DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION DEVICES OR TECHNOLOGY DESCRIBED...

Страница 3: ...Kit Contents 1 Configuring the Z183 Evaluation Board 1 Installing the EMAC Board 5 Interrupt Cabling 6 Interrupt Selection 7 Address Jumpers 7 Software Development 7 CS8900A Address Map 7 Device Drive...

Страница 4: ...Z183 EMAC Board User Manual iv UM008301 0401...

Страница 5: ...se items contact your local sales office One EMAC board labeled 10 Base T interface Interrupt wiring cable assembly Z183 EMAC Board User Manual Configuring the Z183 Evaluation Board To configure the Z...

Страница 6: ...Z183 EMAC Board User Manual 2 UM008301 0401 4 Select a name for your connection and click OK 5 When the Connect To window appears click Cancel...

Страница 7: ...C Board User Manual 3 UM008301 0401 6 In the Hyperterminal window pull down the FILE menu and select PROPERTIES 7 In the Connect Using field find the port that your serial cable is connected to and se...

Страница 8: ...Z183 EMAC Board User Manual 4 UM008301 0401 8 Click the Configure button and configure the screen as shown below Then click OK to return to the Hyperterminal window...

Страница 9: ...he EMAC board so that the components are facing upward 3 Make sure the Z183 board is turned off 4 Place the EMAC board s 50 pin J1 socket header directly over the J22 pin header of the Z183 board The...

Страница 10: ...1 Using the Debug Monitor send an I command to Input I O byte at 2000h When the I O port 2000h is read the Ethernet MAC chip on the EMAC board comes out of hardware reset condition 12 When the LINK LE...

Страница 11: ...ge of I O address map even though the Ethernet chip is tightly decoded at 2300H 230FH I O locations When specifying the PacketPage addresses via the on chip PacketPage pointer use the normal addresses...

Страница 12: ...r chain management that may be required The argument i available to your code is a bit mask indicating the receive error conditions applicable to the frame that you can now retrieve using a ReceivePkt...

Страница 13: ...ntry and a similar amount of instructions on exit are executed with a DI general master interrupt disable instruction The transmit and receive function callbacks are issued with all other general inte...

Страница 14: ...to accept broadcast frames CRCerrorA Specify to accept frames even with CRC errors RuntA Specify to accept frames that are less than 64 bytes long ExtradataA Specify to accept frames larger than 1518...

Страница 15: ...ransmitting an outbound queue int ReceivePkt EMACFRAME databuff This function retrieves a received frame into the user buffer that databuff points to You must ensure that the buffer at databuff contai...

Страница 16: ...d as arguments return values in function calls by the user program The driver does not assume any queuing or buffer chaining User programs higher level drivers or protocol stacks should manage buffers...

Страница 17: ...d contains the destination address of the packet and examining Flags indicates the Rx Filter criteria by which this packet has been accepted by the MAC SrcAddr For a transmit operation the three word...

Страница 18: ...GND D4 A17 SD10 10BT_RDN SD4 RESET_HIGH D0 A10 IORD A14 A9 D0 RESET D4 A15 INT1 SD12 SD5 SD13 D6 D7 SD7 SD15 A0 GND INT2 AM0 A17 RAMRD AM1 A18 INT0 D2 A16 GND A2 GND A11 ROMWR ROMRD NMI RESET Y1 20Mh...

Отзывы: