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 CPDMA_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 WR_C0_RX_THRESH_EN. The masked interrupt status can be read in the address location of RX_THRESH_STAT bit in the WR_C0_RX_THRESH_STAT register.
The RX_THRESH_PULSE is asserted when enabled when the channel's associated free buffer count RX n_FREEBUFFER is less than or equal to the corresponding RX n_PENDTHRESH register.
Upon reception of an interrupt, software should perform the following:
- Read the 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 CPDMA_RX_INTMASK_CLEAR register.
- The receive threshold pulse interrupt could be disabled by clearing to 0 the corresponding bits in the WR_C0_RX_THRESH_EN register.
The software could still poll for the CPDMA_RX_INTSTAT_RAW and CPDMA_RX_INTSTAT_MASKED registers, if the corresponding interrupts are enabled.