Functional Description
When the 3PSW completes the transmission of a packet, the 3PSW subsystem issues an interrupt to the
CPU by writing the packet’s last buffer descriptor address to the appropriate channel queue’s transmit
completion pointer located in the state RAM block. The interrupt is generated by the write when enabled
by the interrupt mask, regardless of the value written.
Upon receiving an interrupt, software should perform the following:
•
Read the TX_STAT register to determine which channel(s) caused the interrupt
•
Process received packets for the interrupting channel(s).
•
Write the 3PSW completion pointer(s) (TXn_CP). The data written by the host (buffer descriptor
address of the last processed buffer) is compared to the data in the register written by the 3PSW
(address of last buffer descriptor used by the 3PSW). If the two values are not equal (which means
that the 3PSW has transmitted more packets than the CPU has processed), the transmit packet
completion interrupt signal remains asserted. If the two values are equal (which means that the host
has processed all packets that the subsystem has transferred), the pending interrupt is cleared. The
value that the 3PSW is expecting is found by reading the transmit channeln completion pointer register
(TXn_CP).
•
Write the 2h to the CPDMA_EOI_VECTOR register.
To disable the interrupt:
•
The eight channel interrupts may be individually disabled by writing to 1 the appropriate bit in the
TX_INTMASK_CLEAR.
•
The receive completion pulse interrupt could be disabled by clearing to 0 all the bits of the TX_EN. The
software could still poll for the TX_INTSTAT_RAW and TX_INTSTAT_MASKED registers if the
corresponding interrupts are enabled.
14.3.1.3.3 Receive Threshold Pulse Interrupt (RX_THRESH_PULSE)
The RX_THRESH_PULSE interrupt is an immediate (non-paced) pulse interrupt selected from the
CPSW_3G RX_THRESH_PEND[7:0] interrupts. The receive DMA controller has eight channels with each
channel having a corresponding threshold pulse interrupt (RX_THRESH_PEND [7:0]).
To enable the receive threshold pulse Interrupt:
•
Enable the required channel interrupts of the DMA engine by setting 1 to the appropriate bit in the
RX_INTMASK_SET register.
•
The receive threshold interrupt(s) to be routed to RX_THRESH_PULSE is selected by setting one or
more bits in the receive threshold interrupt enable register RX_THRESH_EN. The masked interrupt
status can be read in the Receive Threshold Masked Interrupt Status (Cn_RX_THRESH_STAT)
register.
The RX_THRESH_PULSE is asserted when enabled when the channel’s associated free buffer count
RXn_FREEBUFFER is less than or equal to the corresponding RXn_PENDTHRESH register.
Upon receiving an interrupt, software should perform the following:
•
Read the Cn_RX_THRESH_STAT bit address location to determine which channel(s) caused the
interrupt.
•
Process the received packets in order to add more buffers to any channel that is below the threshold
value.
•
Write the CPSW_3G completion pointer(s).
•
Write the value 0h to the CPDMA_EOI_VECTOR register.
The threshold pulse interrupt is an immediate interrupt intended to indicate that software should
immediately process packets to preclude an overrun condition from occurring for the particular channels.
To disable the interrupt:
•
The eight channel receive threshold interrupts may be individually disabled by writing to 1 the
appropriate bit in the RX_INTMASK_CLEAR register.
•
The receive threshold pulse interrupt could be disabled by clearing to Zero the corresponding bits of
the RX_THRESH_EN. The software could still poll for the RX_INTSTAT_RAW and
INTSTAT_MASKED registers if the corresponding interrupts are enabled.
1179
SPRUH73H – October 2011 – Revised April 2013
Ethernet Subsystem
Copyright © 2011–2013, Texas Instruments Incorporated