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
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
Jeremy,
Thank you for your answer.
David