Z183 EMAC Board
User Manual
12
UM008301-0401
uint GetRxMissCount(void);
This function returns the accumulated count of frames that were missed.
Frames can be missed if there is a shortage of on-chip buffer space when the
frames are not picked up in time to make room for new frames arriving on the
wire. This call automatically resets the Rx missed error count to zero.
uint GetTxColCount(void);
This function returns the accumulated count of transmit collisions when
transmitting frames. This call automatically resets the collision count to zero.
Transmit and Receive Buffer Structure
The driver functions manage the send and receive operations that pointers use
to gain access to buffers provided by the user. These pointers are passed 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 (if
required) by deriving other forms of buffer definitions suitable for the application.
The driver internally uses the following internal structure:
typedef struct Frm {
usint
Flags;
usint
Length;
usint
DstAddr[3];
usint
SrcAddr[3];
usint
FrmType;
//can be type or length
usint
Payload[800]; //max size is 1500 bytes (< 800 words)
} EMACFRAME;
“usint” is defined as unsigned 16 bit integer.
Flags
Flags is NULL or set to one of the valid TxCMD bit value combinations on a
transmit operation request by the user program. In a receive operation, Flags
contains a receive event report provided by the hardware. The flag bits indicate
an error-free receive or CRC, Runt, and excess length errors. See the
ethdr183.h header file for a description of the flag bits.