BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
158
Section 7: DMA
Document
1250_1125-UM100CB-R
The watermark status, which is used to raise an interrupt, is continually updated. If the number of descriptors
falls below a watermark just as the CPU is doing a write to the count register to increase the number of
descriptors owned by the DMA engine, the interrupt line may be briefly asserted but all status bits will be clear
when the CPU has entered the interrupt service routine and reads the status register. Software should be
written to work correctly if these spurious interrupts occur (or only add buffers in the ISR or with the interrupts
disabled).
If the receive DMA engine runs out of descriptors during a packet the tail of the packet is lost and the dscr_err
bit is set in the receive status. In this case the status includes enough information for the software to compute
the size of data actually transferred, but in most cases the packet will just be dropped. If the receive engine is
out of descriptors when the start of a packet is received the whole packet is dropped and the interface will
signal a packet dropped interrupt. In either case packet reception will resume with the start of the first packet
received after the count has been written to make more descriptors available. The Ethernet receive DMA
channels count the packets that are dropped because the channel is out of descriptors when the start of packet
is received, on parts with system revision indicating PERIPH_REV3 or greater this count can be read from the
dma_oodpktlost
register. Any write to this register (regardless of data) will zero the count.
C
OMPLETION
I
NTERRUPTS
The controller has a packet counter and will generate an interrupt after transferring a configurable number of
packets. This is of most use in the receive channel. If the interrupt count is set to one then an interrupt will be
raised after every packet. Since this can swamp the system with interrupts, the count would typically be set
higher and the receive interrupt service routine will be written to accept a batch of packets. In order to avoid
imposing a high delay before packets are serviced when they are arriving at a low rate, the interrupt can also
be raised by a timer. The timer starts counting when the first packet reception is complete and will increment
every 768 CPU clocks (i.e. the counter is clocked at CPUclock/(3*256)). If the interrupt has not been raised
because the packet count threshold has been reached it will be forced when the timer has counted to a
programmed limit. Reading the interface interrupt status register will clear both the packet counter and resets
the timer, both will remain at zero until the next packet transfer is complete. The device driver must be written
based on this behavior and should handle (or queue) any interrupts that are marked when the status is read.
The completion interrupts are also available for transmit interfaces. In this case the counter will increment when
a packet transmission has completed, and the timer will start running when the first transmission has
completed. This could be used to detect the transmitter being unable to send for an unacceptably long period.
The interrupt is cleared by reading the channel's interrupt status register, this disables the timer and zeros the
received packet count preparing the system for the next batch of packets.
On parts with system revision indicating PERIPH_REV3 or greater the current value of the received packet
count can be read from the
dma_oodpktlost
register.
E
XPLICIT
D
ESCRIPTOR
I
NTERRUPTS
The descriptors include a flag to cause the controller to raise an interrupt when it has finished using the marked
descriptor. The flag can be set on the last descriptor in a batch of packets that are queued for transmission,
software will then receive notification when they have all been sent even if more packets have been queued.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...