www.ti.com
EMAC Functional Architecture
2.15 Initialization
2.15.1Enabling the EMAC/MDIO Peripheral
When the device is powered on, the EMAC peripheral is disabled. Prior to
EMAC/MDIO is enabled through the chip level module state control register 0 (MDCTL0) and module status register 0 (MDSTAT0). For detailed information on the programming sequence, see the
2.15.2EMAC Control Module Initialization
The EMAC control module is used for global interrupt enable, and to pace
Note that although the EMAC control module and the EMAC module have slightly different functions, in practice, the type of maintenance performed on the EMAC control module is more commonly conducted from the EMAC module software (as opposed to the MDIO module).
The initialization of the EMAC control module consists of two parts:
1.Configuration of the interrupt on the DSP.
2.Initialization of the EMAC control module:
–Setting the interrupt pace count (using EWINTTCNT)
–Initializing the EMAC and MDIO modules
–Enabling interrupts in the EMAC control module (using EWCTL)
See Example 4 to view example code used to perform the actions associated with the second part of the EMAC control module initialization when using the
Use the system’s interrupt controller to map the EMAC interrupts to one of the CPU’s interrupts. Once the interrupt is mapped to a CPU interrupt, general masking and unmasking of the interrupt (to control reentrancy) should be done at the chip level by manipulating the interrupt enable mask. The EMAC control module control register (EWCTL) should only enable and disable interrupts from within the EMAC interrupt service routine (ISR), as disabling and
SPRU975B | Ethernet Media Access Controller (EMAC)/Management Data Input/Output (MDIO) | 57 |