Is AN4765 applicable to the iMXRT processors?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Is AN4765 applicable to the iMXRT processors?

989件の閲覧回数
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

ラベル(1)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

910件の閲覧回数
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 件の賞賛
返信

910件の閲覧回数
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]

910件の閲覧回数
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 件の賞賛
返信