dm9000 Network Port Transceiver control and MAC address filtering settings

Source: Internet
Author: User
Tags pack

Objective: To complete the network Port transceiver debugging   process:     1, network port initialization, according to the chip data sheet configuration  2, the number of network port, first to the TX FIFO in DM9000 to the data, and then sent to send the register to complete the sending;  3, network port reception.      1) Interrupt mode: DM9000 interrupts can be queried by proactively querying the DM9000 interrupt register, and by interrupting the DSP system via the Dm9000int pin, in order to query the mode of interrupt type.                                                    & nbsp;       The advantages of using DM9000 int for DSP interrupts are: You can avoid the constant query of the CPU DM9000 interrupt registers; Optimize the case of lost frames      2) MAC address filtering:    with DM9000 RCR (accept control Register) register and DM9000 Physical address and broadcast address register together to implement filtering capabilities for mismatched MAC address packs                                             & Nbsp;               &nbsP                               Configuration Instructions:                             Assume that the local MAC address configured is 5b 6d 5c 58 73. Note that the first MAC address needs to be even                               Configure the value of the RCR register to 0x33: Open DM9000 promiscuous mode, at which time DM9000 can accept all network packets, including                              Broadcast Frames    :  FF FF FF FF FF FF xx xx xx xx xx xx.                               Other MAC address pack:  28 5b 6d 5c xx... -xx xx xxx xx xx xx         &nb sp;           &Nbsp;     Multicast Frame  :33-----------xx xxx xx xx xx xx xx...          &nbs p;                 Current matching MAC address pack: 5b 6d 5c X-ray xx xx xxx xx × X xx...                              configures the value of the RCR register to 0x31: That is, to turn off DM9000 promiscuous mode, at which time DM9000 can accept broadcast packets, multicast packets, matching local MAC address packs                               Broadcast frame    :  FF FF FF FF FF FF xx xx xx xx xx xx.                               Multicast frames  :33 (xx xx), xxx, xx xx xx...           &n bsp;                Current matching MAC address pack: 5b 6d 5c, x, xx xx xx xx xx. xx xx ...                             Configure the value of the RCR register to 0x39: Turns off the DM9000 multi-packet mode, seemingly invalid, or can accept the broadcast packet, multicast packet, matching local MAC address pack                               If you need to further filter out the broadcast packets and multicast packets, need to use broadcast storage address, from the online data query, the broadcast register address here is equivalent to a check bit, can calculate and verify the MAC address,                             Compliance is worth the disruption from the Mac, The non-conformance is filtered out (not verified by yourself); This setting of the broadcast hosting address is all zero, tested to be able to remove other multicast packets and broadcast packets, only to receive matching local MAC address                              Data           3) DSP porting:                                                           DM9000 data received after the MAC group frame, the format is as follows:                                                            &nBsp                           The first byte is the valid flag bit for the accepted package; status is the state bit; data length; there are actually two check bits in the back                                                         assumes that the PC side of the host computer sends a data format with a data length of 1040: FF FF FF FF FF FF 5b 6d 5c 58 73 reserved for (4byte)   data for (1024byte) total length of  1040 byte        & nbsp;                    Network Port accepted package format is:                                                           xx 04     FF FF FF FF FF 5b 6d 5c 58 73 reserved for (4byte)   data for (1024byte) CRC (4byte);        &nbsp ;                    Accept packages with a data length of 0x414 that is 1044 The extra 4byte is followed by crc                              There was a problem with reading during the transplant:            & nbsp;                1, the program was ported to Flash after the discovery of the received data errors.                                                           Cause: The DM9000 internal setting reads the data from the RX FIFO using the automatic pointer increment mode, and if the data arrives without the frame length (1044) of the accepted package, Then the automatic pointer of the RX SRAM does not automatically jump back to the initial position, causing the data to be read incorrectly when the interrupt is entered;        &NBsp;                                                   The code snippet wants to extract the signal directly from the received data;                            rx_state = INW ();                             Phy_addr[0] = INW (); .....                             Because these defined variables are simply removed to occupy the corresponding portion of the packet, the read RX FIFO pointer moves to the valid data position in turn. Then get valid data bits;                            because the DSP program code opens the highest level of optimization, these unused pieces of code are directly optimized so that the RX FIFO pointer is not shifted to the data bit during operation. Not all are valid by adding the volatile keyword to the variable, so make the following changes to the code if there are errors please correct me.

dm9000 Network Port Transceiver control and MAC address filtering settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.