This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: EDMA

Part Number: AM3352
Other Parts Discussed in Thread: AM3358

Hi Champs,

EDMA is able to set priority.

When higher EDMA event is processing,  is it able to interrupt lower EDMA event ?

If so, what kind of setting do we need ?

Regards,

Kz777

  • Please post which SDK you use.
  • We are going to use latest RTOS SDK base
    software-dl.ti.com/.../index_FDS.html
  • Kz777,

    Can you explain what is your usage case? Assuming there are two EDMA transfers running in parallel, the higher priority one will get more resource than the lower priority one. This is done by EDMA priority setting.

    Do you mean you want something like interrupt: When a lower priority interrupt is executing and a higher one coming in and it preempt the lower ISR execution. You want a lower EDMA preempt by higher one?

    Regards, Eric
  • Hi Eric,

    I re-confirmed detail.

    1: During transferring Higher priority DMA , lower priority one have to wait ? (lower priority DMA don't interrupt higher one)
    -But, according to your comment, lower priority is also transfer. This priority change is DMA resource rate., right ?

    2: When low priority DMA transfer, is this able to interrupt higher priority DMA request immediately ?
    Actually, when it start higher priority DMA, it has some over-head. Do you decide this overhead timing ?
  • Hi,

    This is what I found in AM3358 TRM:

    11.3.1.1
    If events on different channels are detected simultaneously, the events are queued based on a fixed
    priority arbitration scheme with the DMA channels being higher priority events than the QDMA channels.
    Among the two groups of channels, the lowest-numbered channel is the highest priority.

    11.3.11
    Queue0 has highest priority and Queue2 has the lowest priority, if Queue0 and Queue1 both have at least
    one event entry and if both TC0 and TC1 can accept transfer requests, then the event in Queue0 is dequeued
    first and its associated PaRAM set is processed and submitted as a transfer request (TR) to TC0.

    11.3.11.4
    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-TC2, because QueueN
    transfer requests are submitted to TCN).

    11.3.12.1.3
    By default, reads are as issued as fast as possible. In some cases, the reads issued by the EDMA3TC
    could fill the available command buffering for a slave, delaying other (potentially higher priority) masters
    from successfully submitting commands to that slave. The rate at which read commands are issued by the
    EDMA3TC is controlled by the RDRATE register. The RDRATE register defines the number of cycles that
    the EDMA3TC read controller waits before issuing subsequent commands for a given TR, thus minimizing
    the chance of the EDMA3TC consuming all available slave resources. The RDRATE value should be set
    to a relatively small value if the transfer controller is targeted for high priority transfers and to a higher
    value if the transfer controller is targeted for low priority transfers.
    In contrast, the Write Interface does not have any performance turning knobs because writes always have
    an interval between commands as write commands are submitted along with the associated write data.

    11.3.14 EDMA3 Prioritization

    The EDMA3 controller has many implementation rules to deal with concurrent events/channels, transfers,
    etc. The following subsections detail various arbitration details whenever there might be occurrence of
    concurrent activity. Figure 11-19 shows the different places EDMA3 priorities come into play.

    11.3.14.1 Channel Priority
    The DMA event registers (ER and ERH) capture up to 64 events; likewise, the QDMA event register
    (QER) captures QDMA events for all QDMA channels; therefore, it is possible for events to occur
    simultaneously on the DMA/QDMA event inputs. For events arriving simultaneously, the event associated
    with the lowest channel number is prioritized for submission to the event queues (for DMA events, channel
    0 has the highest priority and channel 63 has the lowest priority; similarly, for QDMA events, channel 0
    has the highest priority and channel 7 has the lowest priority). This mechanism only sorts simultaneous
    events for submission to the event queues.
    If a DMA and QDMA event occurs simultaneously, the DMA event always has prioritization against the
    QDMA event for submission to the event queues.

    11.3.14.2 Trigger Source Priority
    If a DMA channel is associated with more than one trigger source (event trigger, manual trigger, and chain
    trigger), and if multiple events are set simultaneously for the same channel (ER.En = 1, ESR.En = 1 ,
    CER.En = 1) , then the EDMA3CC always services these events in the following priority order: event
    trigger (via ER) is higher priority than chain trigger (via CER) and chain trigger is higher priority than
    manual trigger (via ESR).
    This implies that if for channel 0, both ER.E0 = 1 and CER.E0 = 1 at the same time, then the ER.E0 event
    is always queued before the CER.E0 event.

    11.3.14.3 Dequeue Priority
    The priority of the associated transfer request (TR) is further mitigated by which event queue is being used
    for event submission (dictated by DMAQNUM and QDMAQNUM). For submission of a TR to the transfer
    request, events need to be de-queued from the event queues. Queue 0 has the highest dequeue priority
    and Queue 2 the lowest.

    11.3.14.4 System (Transfer Controller) Priority
    INIT_PRIORITY_0 and INIT_PRIORITY_1 registers in the chip configuration module are used to configure
    the EDMA TC's priority through the system bus infrastructure.

    Regards, Eric
  • Hi Eric,
    Thanks for your point out.
    In the system priority, it sout TC0-TC3.
    1)My question, when TC0 is processing, does TC3 have to wait until TC0 process finish ?
    2)When TC3 is processing, does this happen to process TC0 due to priority difference ?
  • Hi Eric,
    I understand my self 1),2) is correct.