29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Ethernet (ETH): media access control (MAC) with DMA controller<br />

RM0008<br />

Unicast destination address filter<br />

The MAC supports up to 4 MAC addresses for unicast perfect filtering. If perfect filtering is<br />

selected (HU bit in the Frame filter register is reset), the MAC compares all 48 bits of the<br />

received unicast address with the programmed MAC address for any match. Default<br />

MacAddr0 is always enabled, other addresses MacAddr1–MacAddr3 are selected with an<br />

individual enable bit. Each byte of these other addresses (MacAddr1–MacAddr3) can be<br />

masked during comparison with the corresponding received DA byte by setting the<br />

corresponding Mask Byte Control bit in the register. This helps group address filtering for the<br />

DA. In Hash filtering mode (when HU bit is set), the MAC performs imperfect filtering for<br />

unicast addresses using a 64-bit Hash table. For hash filtering, the MAC uses the 6 upper<br />

CRC bits of the received destination address to index the content of the Hash table. A value<br />

of 000000 selects bit 0 in the selected register, <strong>and</strong> a value of 111111 selects bit 63 in the<br />

Hash Table register. If the corresponding bit (indicated by the 6-bit CRC) is set to 1, the<br />

unicast frame is said to have passed the Hash filter; otherwise, the frame has failed the<br />

Hash filter.<br />

Multicast destination address filter<br />

The MAC can be programmed to pass all multicast frames by setting the PAM bit in the<br />

Frame filter register. If the PAM bit is reset, the MAC performs the filtering for multicast<br />

addresses based on the HM bit in the Frame filter register. In Perfect filtering mode, the<br />

multicast address is compared with the programmed MAC destination address registers (1–<br />

3). Group address filtering is also supported. In Hash filtering mode, the MAC performs<br />

imperfect filtering using a 64-bit Hash table. For hash filtering, the MAC uses the 6 upper<br />

CRC bits of the received multicast address to index the content of the Hash table. A value of<br />

000000 selects bit 0 in the selected register <strong>and</strong> a value of 111111 selects bit 63 in the Hash<br />

Table register. If the corresponding bit is set to 1, then the multicast frame is said to have<br />

passed the Hash filter; otherwise, the frame has failed the Hash filter.<br />

Hash or perfect address filter<br />

The DA filter can be configured to pass a frame when its DA matches either the Hash filter<br />

or the Perfect filter by setting the HPF bit in the Frame filter register <strong>and</strong> setting the<br />

corresponding HU or HM bits. This configuration applies to both unicast <strong>and</strong> multicast<br />

frames. If the HPF bit is reset, only one of the filters (Hash or Perfect) is applied to the<br />

received frame.<br />

Broadcast address filter<br />

The MAC does not filter any broadcast frames in the default mode. However, if the MAC is<br />

programmed to reject all broadcast frames by setting the BFD bit in the Frame filter register,<br />

any broadcast frames are dropped.<br />

Unicast source address filter<br />

The MAC can also perform perfect filtering based on the source address field of the received<br />

frames. By default, the MAC compares the SA field with the values programmed in the SA<br />

registers. The MAC address registers [1:3] can be configured to contain SA instead of DA<br />

for comparison, by setting bit 30 in the corresponding register. Group filtering with SA is also<br />

supported. The frames that fail the SA filter are dropped by the MAC if the SAF bit in the<br />

Frame filter register is set. Otherwise, the result of the SA filter is given as a status bit in the<br />

Receive Status word (see RDES0: Receive descriptor Word0).<br />

866/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!