09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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.

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

1. Disable the transmit DMA and wait for any previous frame transmissions to complete.<br />

These transmissions can be detected when the transmit interrupt ETH_DMASR<br />

register[0] is received.<br />

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

ETH_MACCR configuration register.<br />

3. Wait for the receive DMA to have emptied all the frames in the Rx FIFO.<br />

4. Disable the receive DMA.<br />

5. Configure and enable the EXTI line 19 to generate either an event or an interrupt.<br />

6. If you configure the EXTI line 19 to generate an interrupt, you also have to correctly<br />

configure the ETH_WKUP_IRQ Handler function, which should clear the pending bit of<br />

the EXTI line 19.<br />

7. Enable Magic packet/Wake-on-LAN frame detection by setting the MFE/ WFE bit in the<br />

ETH_MACPMTCSR register.<br />

8. Enable the MAC power-down mode, by setting the PD bit in the ETH_MACPMTCSR<br />

register.<br />

9. Enable the MAC Receiver by setting the RE bit in the ETH_MACCR register.<br />

10. Enter the system’s Stop mode (for more details refer to Section 5.3.4: Stop mode):<br />

11. On receiving a valid wakeup frame, the Ethernet peripheral exits the power-down<br />

mode.<br />

12. Read the ETH_MACPMTCSR to clear the power management event flag, enable the<br />

MAC transmitter state machine, and the receive and transmit DMA.<br />

13. Configure the system clock: enable the HSE and set the clocks.<br />

29.5.9 Precision time protocol (IEEE1588 PTP)<br />

The IEEE 1588 standard defines a protocol that allows precise clock synchronization in<br />

measurement and control systems implemented with technologies such as network<br />

communication, local computing and distributed objects. The protocol applies to systems<br />

that communicate by local area networks supporting multicast messaging, including (but not<br />

limited to) Ethernet. This protocol is used to synchronize heterogeneous systems that<br />

include clocks of varying inherent precision, resolution and stability. The protocol supports<br />

system-wide synchronization accuracy in the submicrosecond range with minimum network<br />

and local clock computing resources. The message-based protocol, known as the precision<br />

time protocol (PTP), is transported over UDP/IP. The system or network is classified into<br />

Master and Slave nodes for distributing the timing/clock information. The protocol’s<br />

technique for synchronizing a slave node to a master node by exchanging PTP messages is<br />

described in Figure 342.<br />

Doc ID 018909 Rev 3 934/1416

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

Saved successfully!

Ooh no, something went wrong!