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.

RM0008<br />

Ethernet (ETH): media access control (MAC) with DMA controller<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 <strong>and</strong> 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 receive data path must be clocked with the Rx CLK clock during Power-down mode,<br />

because it is involved in magic packet/wake-on-LAN frame detection. However, the transmit<br />

path <strong>and</strong> the application path clocks can be turned off during Power-down mode. Wakeup<br />

happens when a valid wakeup frame is received. The recommended power-down <strong>and</strong><br />

wakeup sequences are as follows:<br />

1. Disable the Transmit DMA (if applicable) <strong>and</strong> wait for any previous frame transmissions<br />

to complete. These transmissions can be detected when Transmit Interrupt<br />

(ETH_DMASR register[0]) is received.<br />

2. Disable the MAC transmitter <strong>and</strong> MAC receiver by clearing the appropriate bits in the<br />

MAC configuration register.<br />

3. Wait until the Receive DMA empties all the frames from the Rx FIFO.<br />

4. Enable Power-down mode by appropriately configuring the PMT registers.<br />

5. Enable the MAC Receiver <strong>and</strong> enter Power-down mode.<br />

Doc ID 13902 Rev 9 871/995

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

Saved successfully!

Ooh no, something went wrong!