09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

wakeup frame is more than 512 bytes long, if the frame has a valid CRC value, it is<br />

considered valid. Wakeup frame detection is updated in the ETH_MACPMTCSR register for<br />

every remote wakeup frame received. If enabled, a PMT interrupt is generated to indicate<br />

the reception of a remote wakeup frame.<br />

Magic packet detection<br />

The Magic Packet frame is based on a method that uses Advanced Micro Device’s Magic<br />

Packet technology to power up the sleeping device on the network. The MAC receives a<br />

specific packet of information, called a Magic Packet, addressed to the node on the network.<br />

Only Magic Packets that are addressed to the device or a broadcast address are checked to<br />

determine whether they meet the wakeup requirements. Magic Packets that pass address<br />

filtering (unicast or broadcast) are checked to determine whether they meet the remote<br />

Wake-on-LAN data format of 6 bytes of all ones followed by a MAC address appearing 16<br />

times. The application enables Magic Packet wakeup by writing a 1 to bit 1 in the<br />

ETH_MACPMTCSR register. The PMT block constantly monitors each frame addressed to<br />

the node for a specific Magic Packet pattern. Each received frame is checked for a<br />

0xFFFF FFFF FFFF pattern following the destination and source address field. The PMT<br />

block then checks the frame for 16 repetitions of the MAC address without any breaks or<br />

interruptions. In case of a break in the 16 repetitions of the address, the 0xFFFF FFFF FFFF<br />

pattern is scanned for again in the incoming frame. The 16 repetitions can be anywhere in<br />

the frame, but must be preceded by the synchronization stream (0xFFFF FFFF FFFF). The<br />

device also accepts a multicast frame, as long as the 16 duplications of the MAC address<br />

are detected. If the MAC address of a node is 0x0011 2233 4455, then the MAC scans for<br />

the data sequence:<br />

Destination address source address ……………….. FFFF FFFF FFFF<br />

0011 2233 4455 0011 2233 4455 0011 2233 4455 0011 2233 4455<br />

0011 2233 4455 0011 2233 4455 0011 2233 4455 0011 2233 4455<br />

0011 2233 4455 0011 2233 4455 0011 2233 4455 0011 2233 4455<br />

0011 2233 4455 0011 2233 4455 0011 2233 4455 0011 2233 4455<br />

…CRC<br />

Magic Packet detection is updated in the ETH_MACPMTCSR register for received Magic<br />

Packet. If enabled, a PMT interrupt is generated to indicate the reception of a Magic Packet.<br />

System consideration during power-down<br />

The Ethernet PMT block is able to detect frames while the system is in the Stop mode,<br />

provided that the EXTI line 19 is enabled.<br />

The MAC receiver state machine should remain enabled during the power-down mode. This<br />

means that the RE bit has to remain set in the ETH_MACCR register because it is involved<br />

in magic packet/ wake-on-LAN frame detection. The transmit state machine should however<br />

be turned off during the power-down mode by clearing the TE bit in the ETH_MACCR<br />

register. Moreover, the Ethernet DMA should be disabled during the power-down mode,<br />

because it is not necessary to copy the magic packet/wake-on-LAN frame into the SRAM.<br />

To disable the Ethernet DMA, clear the ST bit and the SR bit (for the transmit DMA and the<br />

receive DMA, respectively) in the ETH_DMAOMR register.<br />

The recommended power-down and wakeup sequences are as follows:<br />

933/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!