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 />

PTP pulse-per-second output signal<br />

This PTP pulse output is used to check the synchronization between all nodes in the<br />

network. To be able to test the difference between the local slave clock and the master<br />

reference clock, both clocks were given a pulse-per-second (PPS) output signal that may be<br />

connected to an oscilloscope if necessary. The deviation between the two signals can<br />

therefore be measured. The pulse width of the PPS output is 125 ms.<br />

The PPS output is enabled through bits 11 and 10 in the TIM2 option register (TIM2_OR).<br />

The default frequency of the PPS output is 1 Hz. PPSFREQ[3:0] (in ETH_PTPPPSCR) can<br />

be used to set the frequency of the PPS output to 2 PPSFREQ Hz.<br />

When set to 1 Hz, the PPS pulse width is 125 ms with binary rollover (TSSSR=0, bit 9 in<br />

ETH_PTPTSCR) and 100 ms with digital rollover (TSSSR=1). When set to 2 Hz and higher,<br />

the duty cycle of the PPS output is 50% with binary rollover.<br />

With digital rollover (TSSSR=1), it is recommended not to use the PPS output with a<br />

frequency other than 1 Hz as it would have irregular waveforms (though its average<br />

frequency would always be correct during any one-second window).<br />

Figure 345. PPS output<br />

Ethernet MAC<br />

PPS output<br />

29.6 Ethernet functional description: DMA controller operation<br />

ai15672<br />

The DMA has independent transmit and receive engines, and a CSR space. The transmit<br />

engine transfers data from system memory into the Tx FIFO while the receive engine<br />

transfers data from the Rx FIFO into system memory. The controller utilizes descriptors to<br />

efficiently move data from source to destination with minimum CPU intervention. The DMA<br />

is designed for packet-oriented data transfers such as frames in Ethernet. The controller can<br />

be programmed to interrupt the CPU in cases such as frame transmit and receive transfer<br />

completion, and other normal/error conditions. The DMA and the STM32F4xx communicate<br />

through two data structures:<br />

● Control and status registers (CSR)<br />

● Descriptor lists and data buffers.<br />

Control and status registers are described in detail in Section 29.8 on page 968. Descriptors<br />

are described in detail in Section on page 948.<br />

The DMA transfers the received data frames to the receive buffer in the STM32F4xx<br />

memory, and transmits data frames from the transmit buffer in the STM32F4xx memory.<br />

Descriptors that reside in the STM32F4xx memory act as pointers to these buffers. There<br />

are two descriptor lists: one for reception, and one for transmission. The base address of<br />

each list is written into DMA Registers 3 and 4, respectively. A descriptor list is forwardlinked<br />

(either implicitly or explicitly). The last descriptor may point back to the first entry to<br />

create a ring structure. Explicit chaining of descriptors is accomplished by configuring the<br />

second address chained in both the receive and transmit descriptors (RDES1[14] and<br />

TDES0[20]). The descriptor lists reside in the Host’s physical memory space. Each<br />

descriptor can point to a maximum of two buffers. This enables the use of two physically<br />

Doc ID 018909 Rev 3 940/1416

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

Saved successfully!

Ooh no, something went wrong!