683
SAM9G45 [DATASHEET]
6438K–ATARM–12-Feb-13
35.4.11
VLAN Support
An Ethernet encoded 802.1Q VLAN tag looks like this:
The VLAN tag is inserted at the 13th byte of the frame, adding an extra four bytes to the frame. If the VID (VLAN
identifier) is null (0x000), this indicates a priority-tagged frame. The MAC can support frame lengths up to 1536
bytes, 18 bytes more than the original Ethernet maximum frame length of 1518 bytes. This is achieved by setting
bit 8 in the network configuration register.
The following bits in the receive buffer descriptor status word give information about VLAN tagged frames:
Bit 21 set if receive frame is VLAN tagged (i.e. type id of 0x8100)
Bit 20 set if receive frame is priority tagged (i.e. type id of 0x8100 and null VID). (If bit 20 is set bit 21 is set also.)
Bit 19, 18 and 17 set to priority if bit 21 is set
Bit 16 set to CFI if bit 21 is set
35.4.12
Wake-on-LAN Support
The receive block supports Wake-on-LAN by detecting the following events on incoming receive frames:
Magic packet
ARP request to the device IP address
Specific address 1 filter match
Multicast hash filter match
If one of these events occurs Wake-on-LAN detection is indicated by asserting the wol output pin for 64 rx_clk
cycles. These events can be individually enabled through bits[19:16] of the Wake-on-LAN register. Also, for Wake-
on-LAN detection to occur, receive enable must be set in the network control register, however a receive buffer
does not have to be available. wol assertion due to ARP request, specific address 1 or multicast filter events
occurs even if the frame is errored. For magic packet events, the frame must be correctly formed and error free.
A magic packet event is detected if all of the following are true:
magic packet events are enabled through bit 16 of the Wake-on-LAN register
the frame’s destination address matches specific address 1
the frame is correctly formed with no errors
the frame contains at least 6 bytes of 0xFF for synchronization
there are 16 repetitions of the contents of specific address 1 register immediately following the synchronization
An ARP request event is detected if all of the following are true:
ARP request events are enabled through bit 17 of the Wake-on-LAN register
broadcasts are allowed by bit 5 in the network configuration register
the frame has a broadcast destination address (bytes 1 to 6)
the frame has a type ID field of 0x0806 (bytes 13 and 14)
the frame has an ARP operation field of 0x0001 (bytes 21 and 22)
the least significant 16 bits of the frame’s ARP target protocol address (bytes 41 and 42) match the value
programmed in bits[15:0] of the Wake-on-LAN register
Table 35-4.
802.1Q VLAN Tag
TPID (Tag Protocol Identifier) 16 bits
TCI (Tag Control Information) 16 bits
0x8100
First 3 bits priority, then CFI bit, last 12 bits VID