Trouble using DMA triggered by GPIO

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

Trouble using DMA triggered by GPIO

1,025 Views
benjaminschroed
Contributor III

Hello,

 

I'm trying to investigate the capabilities of the DMA, and as an example, I'm trying to trigger the DMA by using a push button GPIO configured as an input.  The platform I'm using is the TWR-K60F120M.  I've been trying to use the processor expert since it helps greatly with the initialization code.

 

I've attached some screenshots of my settings.  I'm simply trying to detect a falling edge of the push button, and initiate a 32-bit memory transfer.  Can anyone point me to what I might be doing wrong?

 

For what it's worth, I know I've gotten the input GPIO working.  I previously had it generating an interrupt, and it was working perfectly.  It is only since I've tried to generate a DMA request instead of an interrupt that I've had issues.

 

Thanks!

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

687 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

What about the issues? Could you please describe the issues clearly , then we can check the reason .

BR

Alice

0 Kudos

686 Views
benjaminschroed
Contributor III

Hi Alice,

It just appears that nothing is happening.  I essentially set the "source" memory location to a test value that I expected to get copied over into the "destination" location.  The destination never gets updated as I would expect it to; it just maintains its initial value.

Thanks

0 Kudos

687 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

There is a DMA sample code develop on CodeWarrior 10.6 , the function is transfer the data 0x12 from "sou" to "des", you can refer to it .

Hope it helps


Have a great day,
Alice

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

0 Kudos

687 Views
benjaminschroed
Contributor III

Hi Alice,

I have no problem getting source code examples for other processors, but there is a lot to configuring the eDMA.  Due to this, I would like to lean on Processor Expert as much as possible to help with initialization of device drivers.  That being said, I have tried writing code to do this using the PDD macro API, but to no avail.

I guess my question is are there any "gotchas" when configuring DMA to be triggered from a peripheral? Is there a basic "Hello World" example that shows a basic peripheral (e.g. GPIO) triggering a DMA using processor expert?

Or maybe a better question.  I want my DMA features to be active all the time and triggered from a peripheral, thus in Processor Expert I only have need to call Init_eDMA.  Are there any other registers I need to poke while I'm in main() to enable/start DMA?

Thanks again!

0 Kudos

687 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Benjamin,

-  About the PE-CW demo code , i have not the GPIO trigger DMA, while there is HW trigger DMA , it use DAC , i think the configure of the DMA

is the same , so you can refer to .   After you add the component "DMA_LDD" or "DMAChannel_ldd" , then right click the component , select the

"help on component " , in the Typical Usage , you can find the demo :

pastedImage_0.png

Does this can help you ?

BR

Alice

0 Kudos