Initialization and Configuration
936
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Ethernet Controller
The external clock source must be 50 MHz with a frequency tolerance of 50 PPM.
2. Select the RMII interface by programming the PINTFS bit field to 0x4 in the Ethernet Peripheral
Configuration (EMACPC) register at offset 0xFC4.
3. Reset the Ethernet MAC to latch the new RMII configuration by setting the SWR bit in the
EMACDMABUSMOD register. This bit resets the Ethernet MAC registers in addition to configuring the
RMII interface. Software must poll the SWR bit to determine when the new configuration has been
registered.
NOTE:
After this configuration is active, if the Ethernet MAC is reset by setting the R0 bit in the
Ethernet MAC Software Reset (SREMAC) register in the System Control Module, then the
interface is set back to its default MII configuration. In this case, the steps listed above must
be repeated to return to an RMII interface.
The Initialization for the DMA for the Ethernet MAC is as follows:
1. Write to the Ethernet MAC DMA Bus Mode (EMACDMABUSMOD) register to set Host bus parameters.
2. Write to the Ethernet MAC DMA Interrupt Mask Register (EMACDMAIM) register to mask unnecessary
interrupt causes.
3. Create the transmit and receive descriptor lists and then write to the Ethernet MAC Receive Descriptor
List Address (EMACRXDLADDR) register and the Ethernet MAC Transmit Descriptor List Address
(EMACTXDLADDR) register providing the DMA with the starting address of each list.
4. Write to the Ethernet MAC Frame Filter (EMACFRAMEFLTR) register, the Ethernet MAC Hash Table
High (EMACHASHTBLH) and the Ethernet MAC Hash Table Low (EMACHASHTBLL) for desired
filtering options.
5. Write to the Ethernet MAC Configuration Register (EMACCFG) to configure the operating mode and
enable the transmit operation.
6. Program Bit 15 (PS) and Bit 11 (DM) of the EMACCFG register based on the line status received or
read from the PHY status register after auto-negotiation.
7. Write to the Ethernet MAC DMA Operation Mode (EMACDMAOPMODE) register to set Bits 13 and 1
to start transmission and reception.
8. Write to the EMACCFG register to enable the receive operation.
The Transmit and Receive engines enter the Running state and attempt to acquire descriptors from the
respective descriptor lists. The Receive and Transmit engines then begin processing Receive and
Transmit operations. The Transmit and Receive processes are independent of each other and can be
started or stopped separately.
15.5.1 Ethernet PHY Initialization
After reset, when the EMAC is powered and enabled, the EMACPC register default reset value may be
sampled and used to configure the PHY. The results of this configuration can also be read in the following
EPHY registers:
•
EPHYBMCR register (MR0)
•
EPHYCFG1 register (MR9)
•
EPHYCFG2 register (MR10)
•
EPHYCFG3 register (MR11)
•
EPHYCTL register (MR25)
The mappings of the EMACPC register bits to the PHY register and bits are as follows:
Table 15-22. EMACPC to PHY Register Mapping
EMACPC Register Bit
Corresponding PHY Register
Corresponding PHY Bit (Bit
No.)
PHYEXT
N/A
N/A
DIGRESTART
N/A
N/A