DMA CITER register modification on-fly

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

DMA CITER register modification on-fly

ソリューションへジャンプ
1,282件の閲覧回数
davidzhou
Contributor V

Hi,

I have K60 and have written a DMA channel with dummy source / destination addresses. I need to modify the

DMA_TCD0_CITER_ELINKNO = DMA_CITER_ELINKNO_CITER_MASK;

  CITER register value (reset to 0x7FFF), after certain numbfer of major loops. My question:

Is it thread-safe to modify the CITER register in another timer interrupt ISR?

Or have to stop the DMA operation and modify the register?

Thank you

David Zhou

0 件の賞賛
返信
1 解決策
1,119件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi David,

Please following the steps to modify the TCD register.

-disable the dma channel by clearing DMA Request Enable bit

-wait for DMA_TCDn.active = 0

-change the TCD to the initial configuration (to start from beginning)

-enable the dma channel by setting DMA Request Enable bit

Now once the dma channel is started again, it again loads TCDn to eDMA registers

and executes the minor loop according to the values in TCDn.

Hope it helps.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,120件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi David,

Please following the steps to modify the TCD register.

-disable the dma channel by clearing DMA Request Enable bit

-wait for DMA_TCDn.active = 0

-change the TCD to the initial configuration (to start from beginning)

-enable the dma channel by setting DMA Request Enable bit

Now once the dma channel is started again, it again loads TCDn to eDMA registers

and executes the minor loop according to the values in TCDn.

Hope it helps.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,119件の閲覧回数
davidzhou
Contributor V

Jeremy,

Thank you for your answer.

David

0 件の賞賛
返信