DMA Channel linking arbitration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA Channel linking arbitration

Jump to solution
1,428 Views
sean_dvorscak
Contributor III

I was wondering how DMA channel link requests are stored, and how they affect arbitration.

Just to give an example, lets say DMA Ch 0 links to DMA Ch 1 when Ch 0 completes its major loop.  The priority of the channels is set for higher channels having priority over lower channels.  If DMA Ch 2 sends a request while DMA Ch 0 is working, when Ch 0 finishes, will DMA service Ch 1 or Ch 2 next?  Does DMA finish all the channel links before servicing any other requests?

The reference manual makes it seem that the DMA channel linking is not considered a hardware request, so you cannot view the requests in the HRS register.  So how does DMA store the requests for linking?

0 Kudos
1 Solution
1,378 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Sean,

Having preemption disabled will mean that channel transfers will not be suspended, therefore, DMA will attend the request that came first.

Best regards,

Felipe

View solution in original post

0 Kudos
3 Replies
1,405 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Sean,

In this case the linked channel will take place once the major loop is completed. So in the scenario you shared as Ch 0 is still working then preemption will occur and the lower priority channel will halt its transfer and allows the channel of higher priority to carry out its transfer. After the completion of major loop then linked channel will take place.

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time. 

------------------------------------------------------------------------------ 

0 Kudos
1,401 Views
sean_dvorscak
Contributor III

Hello Felipe,

I should have also mentioned that I have preemption disabled.

The scenario is more about what will happen if Ch 0 is supposed to link to Ch1, but there is already a DMA request for Ch 2 when Ch 0 finishes the major loop.  Will it finish the link chain first, or will it service Ch 2 after Ch 0?

0 Kudos
1,379 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Sean,

Having preemption disabled will mean that channel transfers will not be suspended, therefore, DMA will attend the request that came first.

Best regards,

Felipe

0 Kudos