How to initialize a DMA channel for a circular buffer?

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

How to initialize a DMA channel for a circular buffer?

ソリューションへジャンプ
1,853件の閲覧回数
dieterfalk
Contributor II

I want to initialize a DMA channel to transfer input capture values (e.g. FTM2_CH0) to a circular destination buffer using the modulo feature. This DMA should run continuously. The buffer will be checked periodically (reading the DADDR register value to determine the current write pointer.

I am not clear about the initialization of the DOFF register and minor-/major loop operation register if I want to use the continuous running DMA with the modulo feature. Can you help me with an example code? Thank you.

ラベル(2)
0 件の賞賛
1 解決策
1,242件の閲覧回数
dieterfalk
Contributor II

Hello,

thanks for these examples. They mainly show the general use of DMA in different examples. The modulo feature is not used.

In any case I think these example will help me to find a solution for my problem. Therefore I will close this task.

Dieter

元の投稿で解決策を見る

0 件の賞賛
7 返答(返信)
1,242件の閲覧回数
rendy
NXP Employee
NXP Employee

Hi,

please try attached example code which should demonstrate using of DMA. Let me know in case of any problems. Project are created with IAR version 7.10, will not work withe lesser version. You can download 30 day trial here: http://supp.iar.com/Download/SW/?item=EWARM-EVAL

Rene

1,243件の閲覧回数
dieterfalk
Contributor II

Hello,

thanks for these examples. They mainly show the general use of DMA in different examples. The modulo feature is not used.

In any case I think these example will help me to find a solution for my problem. Therefore I will close this task.

Dieter

0 件の賞賛
1,242件の閲覧回数
timesyssupport
Senior Contributor II

Hello Dieter,

Are you looking to do this in MQX or Linux? Let me know, and I will see if there is any similar code available.

Thanks,

Timesys Support

0 件の賞賛
1,242件の閲覧回数
dieterfalk
Contributor II

Hello,

the code should be independent on any OS.

Dieter

0 件の賞賛
1,242件の閲覧回数
timesyssupport
Senior Contributor II

Hello Dieter,

I have reviewed all Linux driver source for the Vybrid Tower that uses eDMA (serial, dspi, asrc, sound), but unfortunately, none of these use the eDMA modulo feature.  karinavalencia, does the Freescale team have any input about how the DMAx_TCDn_DOFF, DMAx_TCDn_NBYTES*, DMAx_TCDn_BITER*, and DMAx_TCDn_CITER* registers should be configured when using the modulo feature of eDMA (bits 3-7 of DMAx_TCDn_ATTR set)? Dieter, feel free to clarify if this is not what you are looking for.

Thanks,

Timesys Support

1,242件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

rendy can you review  previous update  from Timesys and share your comments?

0 件の賞賛
1,242件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you help with this case?

0 件の賞賛