DM9000A
APPLICATION NOTES
Preliminary 31
Version: DM9000A-AN-V121
November 27, 2007
5.6.2 Packet Reception
The definition of MRCMDX (REG. F0H) is the memory data read command without address
increment register. MRCMDX is only used to read the received packet ready flag "01", or LSB
Bit [0] = 1 and Bit [7:5] & Bit [4:2] indicated the IP/TCP/UDP checksum status and type, from
the RX FIFO SRAM.
Here is an example to get the RX ready message:
(u8) RX_ready = ior ( 0xF0 );
/* dummy READ the packet RX ready flag */
RX_ready = (u8) inb( 4 ); /* got the most updated data */
if ( (RX_ready & 0x01)==1 ) { /* RX ready check: this byte must be "01" or "00" */
/* check the RX status & length (see ch.5.6.3) and income packets (see ch.5.6.4) */
} else if ( (RX_ready & 0x2)!=0 ) { /* stop interface and wait to *reset device */
iow ( 0xFF, 0x80 );
/* stop INT request */
iow ( 0xFE, 0x0F );
/* clear ISR status */
iow ( 0x05, 0x00 );
/* stop RX function */
(u8) device_wait_reset = TRUE;
/* raise the MAC/ PHY software-reset flag */
/* iow ( 0x00, 0x01 );
// it’s quick software-reset to replace above*
udelay ( 10 );
iow ( 0x00, NCR_set );
iow ( 0xFF, 0x80 );
iow ( 0x05, RCR_set | 1 );
*/
/* then, re-new system variables and counters for dropped and queued packets... */
}
5.6.3 To Check the Packet Status and Length
MRCMD (REG. F2H): memory data read command with the increment of the RX read pointer.
The read pointer will be increased after reading the memory read command MRCMD (REG.
F2H). The size, the increment of the RX read pointer, is depended on the system application,
which the I/O bus width is Byte/ Word to increase one or two bytes respectively. MRCMD
(REG. F2H) is only used to read the RX status, length and the packet's data from the RX
SRAM.