Architecture
1852
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
EMAC/MDIO Module
32.2.17.2.2 User Access Completion Interrupt
When the GO bit in one of the MDIO register USERACCESS0 transitions from 1 to 0 (indicating
completion of a user access) and the corresponding USERINTMASKSET bit in the MDIO user command
complete interrupt mask set register (USERINTMASKSET) corresponding to USERACCESS0 is set, a
user access completion interrupt (USERINT) is asserted. This interrupt event is also captured in the
USERINTRAW bit in the MDIO user command complete interrupt register (USERINTRAW).
USERINTRAW bits 0 and bit 1 correspond to USERACCESS0 and USERACCESS1, respectively.
When the interrupt is enabled and generated, the corresponding USERINTMASKED bit is also set in the
MDIO user command complete interrupt register (USERINTMASKED). The interrupt is cleared by writing
back the same bit to USERINTMASKED (write to clear).
The application software must acknowledge the EMAC control module after receiving MDIO interrupts by
writing the appropriate C0MISC key to the EMAC End-Of-Interrupt Vector (MACEOIVECTOR). See
for the acknowledge key values.
32.2.17.3 Proper Interrupt Processing
All the interrupts signaled from the EMAC and MDIO modules are level driven, so if they remain active,
their level remains constant; the CPU core may require edge- or pulse-triggered interrupts. In order to
properly convert the level-driven interrupt signal to an edge- or pulse-triggered signal, the application
software must make use of the interrupt control logic contained in the EMAC control module.
discusses the interrupt control contained in the EMAC control module. For safe interrupt
processing, upon entry to the ISR, the software application should disable interrupts using the EMAC
control module registers C0RXTHRESHEN, C0RXEN, C0TXEN, C0MISCEN, and then reenable them
upon leaving the ISR. If any interrupt signals are active at that time, this creates another rising edge on
the interrupt signal going to the CPU interrupt controller, thus triggering another interrupt. The EMAC
control module also uses the EMAC control module registers INTCONTROL, C0TXIMAX, and C0RXIMAX
to implement interrupt pacing. The application software must acknowledge the EMAC control module by
writing the appropriate key to the EMAC End-Of-Interrupt Vector (MACEOIVECTOR). See
for the acknowledge key values.
32.2.17.4 Interrupt Multiplexing
The EMAC control module combines different interrupt signals from both the EMAC and MDIO modules
into four interrupt signals (C0RXTHRESHPULSE, C0RXPULSE, C0TXPULSE, C0MISCPULSE) that are
routed to the Vectored Interrupt Manager (VIM). The VIM is capable of relaying all four interrupt signals to
the CPU.
When an interrupt is generated, the reason for the interrupt can be read from the MAC input vector
register (MACINVECTOR) located in the EMAC memory map. MACINVECTOR combines the status of the
following 28 interrupt signals: TXPEND
n
, RXPEND
n
, RXTHRESHPEND
n
, STATPEND, HOSTPEND,
LINKINT0, and USERINT0.
For more details on the interrupt mapping, see your device-specific datasheet and VIM chapter of the
Technical Reference Manual.