Functional Description
NOTE:
If an event is ready to be queued and both the event queue and the EDMA3 transfer
controller that is associated to the event queue are empty, then the event bypasses the
event queue, and moves the PaRAM processing logic, and eventually to the transfer request
submission logic for submission to the EDMA3TC. In this case, the event is not logged in the
event queue status registers.
11.3.11.2 Queue RAM Debug Visibility
There are four event queues and each queue has 16 entries. These 16 entries are managed in a circular
FIFO manner. There is a queue status register (QSTAT) associated with each queue. These along with all
of the 16 entries per queue can be read via registers QSTATn and QxEy, respectively.
These registers provide user visibility and may be helpful while debugging real-time issues (typically post-
mortem), involving multiple events and event sources. The event queue entry register (QxEy) uniquely
identifies the specific event type (event-triggered, manually-triggered, chain-triggered, and QDMA events)
along with the event number (for all DMA/QDMA event channels) that are in the queue or have been de-
queued (passed through the queue).
Each of the 16 entries in the event queue are read using the EDMA3CC memory-mapped register. By
reading the event queue, you see the history of the last 16 TRs that have been processed by the EDMA3
on a given queue. This provides user/software visibility and is helpful for debugging real-time issues
(typically post-mortem), involving multiple events and event sources.
The queue status register (QSTATn) includes fields for the start pointer (STRTPTR) which provides the
offset to the head entry of an event. It also includes a field called NUMVAL that provides the total number
of valid entries residing in the event queue at a given instance of time. The STRTPTR may be used to
index appropriately into the 16 event entries. NUMVAL number of entries starting from STRTPTR are
indicative of events still queued in the respective queue. The remaining entry may be read to determine
what's already de-queued and submitted to the associated transfer controller.
11.3.11.3 Queue Resource Tracking
The EDMA3CC event queue includes watermarking/threshold logic that allows you to keep track of
maximum usage of all event queues. This is useful for debugging real-time deadline violations that may
result from head-of-line blocking on a given EDMA3 event queue.
You can program the maximum number of events that can queue up in an event queue by programming
the threshold value (between 0 to 15) in the queue watermark threshold A register (QWMTHRA). The
maximum queue usage is recorded actively in the watermark (WM) field of the queue status register
(QSTATn) that keeps getting updated based on a comparison of number of valid entries, which is also
visible in the NUMVAL bit in QSTATn and the maximum number of entries (WM bit in QSTATn).
If the queue usage is exceeded, this status is visible in the EDMA3CC registers: the QTHRXCDn bit in the
channel controller error register (CCERR) and the THRXCD bit in QSTATn, where n stands for the event
queue number. Any bits that are set in CCERR also generate an EDMA3CC error interrupt.
11.3.11.4 Performance Considerations
The main system bus infrastructure (L3) arbitrates bus requests from all of the masters (TCs, CPU(S), and
other bus masters) to the shared slave resources (peripherals and memories).
The priorities of transfer requests (read and write commands) from the EDMA3 transfer controllers with
respect to other masters within the system crossbar are programmed using the queue priority register
(QUEPRI). QUEPRI programs the priority of the event queues (or indirectly, TC0-TC3, because QueueN
transfer requests are submitted to TCN).
Therefore, the priority of unloading queues has a secondary affect compared to the priority of the transfers
as they are executed by the EDMA3TC (dictated by the priority set using QUEPRI).
913
SPRUH73H – October 2011 – Revised April 2013
Enhanced Direct Memory Access (EDMA)
Copyright © 2011–2013, Texas Instruments Incorporated