723
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
When the filter n is offset and the corresponding byte mask is 1, this register with a preset CRC-16 code is used for
comparison with the CRC-16 value calculated by the frame data (generator polynomial is 0x8005).
Remote wakeup frame detection
Set ETH_MACPMTCTRLSTS.RWKPKTEN to 1 to enable detection of remote wakeup frames. PMT module
supports 4 programmable filters, allowing different receive frame modes to be supported. If the received frame passes
the address filtering of the filter command, and the filter CRC-16 matches the CRC of the incoming frame, MAC
identifies the frame as a wake-up frame. The Remote Wakeup CRC field determines the CRC value to compare with
the filter CRC-16. PMT module only checks whether the length of the remote wake-up frame is wrong, whether FCS
is wrong, whether Dribble bit is wrong, whether MII is wrong, whether there is a collision, and ensuring that the
remote wake-up frame is not a stub frame. Even if the length of the remote wake-up frame exceeds 512 bytes, if the
frame has a valid CRC value, it is still considered a valid wake-up frame. ETH_MACPMTCTRLSTS.RWKPRCVD
is set whenever a remote wakeup frame is detected. A remote wakeup frame wakeup interrupt will also be generated
if ETH_MACPMTCTRLSTS.RWKPKTEN is enabled.
Magic Packet detection
Setting ETH_MACPMTCTRLSTS.MGKPKTEN to 1 enables detection of Magic Packet wakeup frames. A Magic
Packet frame is a specially constructed data packet dedicated to wake-up that can be received, analyzed and
recognized by the Ethernet module and triggers a wake-up event. The frame format of the Magic Packet wake-up
frame is as follows: 6 bytes of all 1 (0xFFFF FFFF FFFF) at any position after the destination address and source
address fields, followed by 16 repeated MAC addresses without any interruption and pause; If there are any gaps
between these 16 repetitions, need to recheck 0xFFFF FFFF FFFF in the input frame. PMT module will always
monitor each frame sent to this node. MAC will filter the Magic Packet frame by address first, and then check whether
it conforms to the format of Magic Packet. If it conforms, it will wake up MAC from a low-power state. Both unicast
and multicast frames can be used as Magic Packet frames.
The following is an example of a Magic Packet frame with station address 0xAABB CCDD EEFF:
Destination address Source address………………………………FF FF FF FF FF FF
AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF
AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF
AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF
AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF AABB CCDD EEFF
…………………………………………………………………………………....CRC
ETH_MACPMTCTRLSTS.MGKPRCVD will be set whenever a Magic Packet frame is detected. Magic Packet
wakeup interrupt will also be generated if ETH_MACPMTCTRLSTS.MGKPKTEN is enabled.
Considerations when system is in low-power mode
If the external interrupt line 19 is enabled, Ethernet PMT module can also detect frames when MCU is in low-power
mode. ETH_MACCFG.RE must be kept as 1 to ensure that MAC also performs Magic Packet/remote wake-up frame
detection in a low-power state. In order to reduce power consumption, it is necessary to clear ETH_MACCFG.TE to
close the transmission engine in the low-power consumption state, and to close Ethernet DMA module by setting
ETH_DMAOPMOD.ST and ETH_DMAOPMOD.SR (corresponding to TxDMA and RxDMA respectively) to 0.