29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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

RM0008<br />

Note:<br />

When an Ethernet wakeup event mapped on EXTI Line19 occurs <strong>and</strong> the MAC PMT<br />

interrupt is enabled <strong>and</strong> the EXTI Line19 interrupt, with detection on rising edge, is also<br />

enabled, both interrupts are generated.<br />

A watchdog timer (see ETH_DMARSWTR register) is given for flexible control of the RS bit<br />

(ETH_DMASR register). When this watchdog timer is programmed with a non-zero value, it<br />

gets activated as soon as the RxDMA completes a transfer of a received frame to system<br />

memory without asserting the Receive Status because it is not enabled in the corresponding<br />

Receive descriptor (RDES1[31]). When this timer runs out as per the programmed value,<br />

the RS bit is set <strong>and</strong> the interrupt is asserted if the corresponding RIE is enabled in the<br />

ETH_DMAIER register. This timer is disabled before it runs out, when a frame is transferred<br />

to memory <strong>and</strong> the RS is set because it is enabled for that descriptor.<br />

Reading the PMT control <strong>and</strong> status register automatically clears the Wakeup Frame<br />

Received <strong>and</strong> Magic Packet Received PMT interrupt flags. However, since the registers for<br />

these flags are in the CLK_RX domain, there may be a significant delay before this update is<br />

visible by the firmware. The delay is especially long when the RX clock is slow (in 10 Mbit<br />

mode) <strong>and</strong> when the AHB bus is high-frequency.<br />

Since interrupt requests from the PMT to the CPU are based on the same registers in the<br />

CLK_RX domain, the CPU may spuriously call the interrupt routine a second time even after<br />

reading PMT_CSR. Thus, it may be necessary that the firmware polls the Wakeup Frame<br />

Received <strong>and</strong> Magic Packet Received bits <strong>and</strong> exits the interrupt service routine only when<br />

they are found to be at ‘0’.<br />

27.8 Ethernet register descriptions<br />

27.8.1 MAC register description<br />

Ethernet MAC configuration register (ETH_MACCR)<br />

Address offset: 0x0000<br />

Reset value: 0x0000 8000<br />

The MAC configuration register is the operation mode register of the MAC. It establishes<br />

receive <strong>and</strong> transmit operating modes.<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

Reserved<br />

WD<br />

JD<br />

Reserved<br />

IFG<br />

CSD<br />

Reserved<br />

FES<br />

ROD<br />

LM<br />

DM<br />

IPCO<br />

RD<br />

Reserved<br />

APCS<br />

BL<br />

DC<br />

TE<br />

RE<br />

rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw<br />

Reserved<br />

Bits 31:24 Reserved<br />

Bit 23 WD: Watchdog disable<br />

When this bit is set, the MAC disables the watchdog timer on the receiver, <strong>and</strong> can receive<br />

frames of up to 16 384 bytes.<br />

When this bit is reset, the MAC allows no more than 2 048 bytes of the frame being received<br />

<strong>and</strong> cuts off any bytes received after that.<br />

906/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!