Is AN4765 applicable to the iMXRT processors?

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

Is AN4765 applicable to the iMXRT processors?

626 Views
EdSutter
Senior Contributor II

I'm trying to dig into the EDMA engine and was wondering if AN4765 (MPC67xx: Configuring and Using the eDMA Controller) was a reasonable place to start.  Any thoughts?

Ed

Labels (1)
Tags (1)
0 Kudos
3 Replies

547 Views
EdSutter
Senior Contributor II

As an add-on to the original question... the SDK has an initialization function for EDMA, EDMA_Init().

Since, as far as I can tell, the TCD is uninitialized at reset, is there any reason why it wouldn't be a good idea to have that function clear out all TCDs at startup?  For example, at the bottom of that function just do...

for(int i=0;i<32;i++) {
   EDMA_TcdReset((edma_tcd_t *)(uint32_t)&base->TCD[i]);
}

0 Kudos

547 Views
mjbcswitzerland
Specialist V

Ed

The eDMA is essentially compatible in all devices using it.
I use the exact code from Kinetis projects on i.MX RT parts, although the eDMA in the i.MX RT parts could, in addition, do 64 bit wide transfers (the version in Kinetis can do only up to 32bit wide transfers).

Random DMA descriptors are a potential tripping stone which can cause random behavior so I have always initialised with:

        unsigned long *ptr_eDMAdes = (unsigned long *)eDMA_DESCRIPTORS;
        while (ptr_eDMAdes < eDMA_DESCRIPTORS_END) {
            *ptr_eDMAdes++ = 0;                                          // clear out DMA descriptors after reset
        }

Beware that the i.MX RT shares DMA channel interrupts with two channels (0 and 16, 1 and 17, etc.) which is also the case for a few Kinetis parts.

Regards

Mark

[uTasker project developer for Kinetis and i.MX RT]

547 Views
EdSutter
Senior Contributor II

Thanks Mark, 

Good to know its safe to use that same documentation, and similar for the TCD clear at startup...

Sorry for late reply...lately I'm not getting email notifications telling me a question was answered...

BTW...I did notice the 0/16, 1/17 sharing.

Tx

0 Kudos