English
Language : 

LAN8740A Datasheet, PDF (42/136 Pages) Microchip Technology – Small Footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver with HP Auto-MDIX and flexPWR® Technology
LAN8740A/LAN8740Ai
As an example, the Host system must perform the following steps to enable the device to assert nINT on detection of a
Magic Packet WoL event:
1. Set the desired MAC address to cause the wake event in the MAC Receive Address A Register (RX_ADDRA),
MAC Receive Address B Register (RX_ADDRB), and MAC Receive Address C Register (RX_ADDRC).
2. Set the Magic Packet Enable (MPEN) bit of the Wakeup Control and Status Register (WUCSR) to enable Magic
Packet detection.
3. Set bit 8 (WoL event indicator) in the Interrupt Mask Register to enable WoL events to trigger assertion of the
nINT interrupt pin.
When a match is triggered, the nINT interrupt pin will be asserted, bit 8 of the Interrupt Source Flag Register will be set,
and the Magic Packet Received (MPR) bit of the Wakeup Control and Status Register (WUCSR) will be set.
Note: Alternatively, the LED1/nINT/nPME, LED2/nINT/nPME, or RXD2/nPME pin can be used to indicate a WoL
event. Refer to Section 3.8.4, "Wake on LAN (WoL)" for additional information.
3.8.4.4 Wakeup Frame Detection
When enabled, the Wakeup Frame detection mode allows the triggering of the nINT or nPME pin when a pre-pro-
grammed Wakeup Frame is received. Wakeup Frame detection provides a way for system designers to detect a cus-
tomized pattern within a packet via a programmable wake-up frame filter. The filter has a 128-bit byte mask that indicates
which bytes of the frame should be compared by the detection logic. A CRC-16 is calculated over these bytes. The result
is then compared with the filter’s respective CRC-16 to determine if a match exists. When a wake-up pattern is received,
the Remote Wakeup Frame Received (WUFR) bit of the Wakeup Control and Status Register (WUCSR) is set.
If enabled, the filter can also include a comparison between the frame’s destination address and the address specified
in the MAC Receive Address A Register (RX_ADDRA), MAC Receive Address B Register (RX_ADDRB), and MAC
Receive Address C Register (RX_ADDRC). The specified address can be a unicast or a multicast. If address matching
is enabled, only the programmed unicast or multicast address will be considered a match. Non-specific multicast
addresses and the broadcast address can be separately enabled. The address matching results are logically OR’d (i.e.,
specific address match result OR any multicast result OR broadcast result).
Whether or not the filter is enabled and whether the destination address is checked is determined by configuring the
Wakeup Filter Configuration Register A (WUF_CFGA). Before enabling the filter, the application program must provide
the detection logic with the sample frame and corresponding byte mask. This information is provided by writing the
Wakeup Filter Configuration Register A (WUF_CFGA), Wakeup Filter Configuration Register B (WUF_CFGB), and
Wakeup Filter Byte Mask Registers (WUF_MASK). The starting offset within the frame and the expected CRC-16 for
the filter is determined by the Filter Pattern Offset and Filter CRC-16 fields, respectively.
If remote wakeup mode is enabled, the remote wakeup function checks each frame against the filter and recognizes the
frame as a remote wakeup frame if it passes the filter’s address filtering and CRC value match.
The pattern offset defines the location of the first byte that should be checked in the frame. The byte mask is a 128-bit
field that specifies whether or not each of the 128 contiguous bytes within the frame, beginning with the pattern offset,
should be checked. If bit j in the byte mask is set, the detection logic checks the byte (pattern offset + j) in the frame,
otherwise byte (pattern offset + j) is ignored.
At the completion of the CRC-16 checking process, the CRC-16 calculated using the pattern offset and byte mask is
compared to the expected CRC-16 value associated with the filter. If a match occurs, a remote wake-up event is sig-
naled. The frame must also pass the FCS check and packet length checking.
Table 3-8 indicates the cases that produce a wake-up event. All other cases do not generate a wake-up event.
TABLE 3-8: WAKEUP GENERATION CASES
Filter Enabled Frame Type CRC Matches
Yes
Unicast
Yes
Yes
Unicast
Yes
Yes
Multicast
Yes
Yes
Multicast
Yes
Yes
Broadcast
Yes
Address
Match
Enabled
No
Yes
X
Yes
X
Any MCAST
Enabled
X
X
Yes
No
X
BCAST
Enabled
X
X
X
X
Yes
Frame
Address
Matches
X
Yes
X
Yes
X
DS00001987A-page 42
 2013-2015 Microchip Technology Inc.