www.ti.com | EMAC Control Module Registers |
3.13EMAC Control Module Interrupt Core Transmit Interrupts Per Millisecond Registers
The EMAC control module interrupt core
Figure 24. EMAC Control Module Interrupt Core 0-2 Transmit Interrupts Per Millisecond Register
(CnTXIMAX)
31 |
|
| 16 |
| Reserved |
|
|
|
|
|
|
|
|
| |
15 | 6 | 5 | 0 |
|
|
|
|
Reserved |
|
| TXIMAX |
|
|
|
|
|
|
LEGEND: R/W = Read/Write; R = Read only;
Table 21. EMAC Control Module Interrupt Core
(CnTXIMAX)
Bit | Field | Value | Description |
|
|
|
|
Reserved | 0 | Reserved | |
|
|
|
|
TXIMAX | TXIMAX is the desired number of CnTXPULSE interrupts generated per millisecond when | ||
|
|
| CnTXPACEEN is enabled in INTCONTROL. |
|
|
|
|
The pacing mechanism can be described by the following
while(1) { interrupt_count = 0;
/* Count interrupts over a 1ms window */
for(i = 0; i < INTCONTROL[INTPRESCALE]*250; i++) {
interrupt_count += NEW_INTERRUPT_EVENTS(); if(i < INTCONTROL[INTPRESCALE]*pace_counter)
BLOCK_EMAC_INTERRUPTS();
else
ALLOW_EMAC_INTERRUPTS();
}
ALLOW_EMAC_INTERRUPTS(); if(interrupt_count > 2*TXIMAX)
pace_counter = 255;
else if(interrupt_count > 1.5*TXIMAX)
pace_counter = previous_pace_counter*2 + 1;
else if(interrupt_count > 1.0*TXIMAX)
pace_counter = previous_pace_counter + 1;
else if(interrupt_count > 0.5*TXIMAX)
pace_counter = previous_pace_counter - 1;
else if(interrupt_count != 0)
pace_counter = previous_pace_counter/2;
else
pace_counter = 0;
previous_pace_counter = pace_counter;
}
SPRUFL5B | EMAC/MDIO Module | 69 |
Submit Documentation Feedback |
|
|
© 2011, Texas Instruments Incorporated