DMA002 and hardware trigger issue.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User265
Level 1
Level 1
Hi @ all,
currently I am trying to use the GPDMA to transfer the result of an ADC conversion to a defined memory address.
As trigger I want to use the 'Result Event' of the ADC module.

I set up a small example where I use the ADC002, the NVIC002 and the DMA002 App.
The apps are connected via the 'Signal Connection' window ("ADC -> NVIC" and "NVIC -> DMA" where the second connection is used for the hardware trigger extension).

As a first try I used the software trigger (placed into the ADC interrupt service routine defined in NVIC002) to start the conversion. Everything worked fine.
Now I reconfigured the DMA app (hardware trigger - peripheral -> memory).

This setup does not work. The ADC module generates an event after every conversion but the DMA does not react on it. I checked the configuration in the generated source code (MULTIPLEXER.c/.h) and it should be fine.

I really appreciate it if someone has a solution or at least a hint for this problem.
0 Likes
8 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Which XMC and evaluation kit are you using?
0 Likes
User265
Level 1
Level 1
Oh sry of course ^^
I am using the XMC4500F144K1024 on the Hexagon Kit.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi EiSa,

You only want to DMA the result of a ADC register which I find it unnecessary. The ADC will trigger an interrupt and you can just simply read and process the ADC value.

DMA is good if you want to transfer huge data from a source to another destination without CPU loading.

Best Regards
Travis
0 Likes
User265
Level 1
Level 1
Hallo Travis,
this is correct if there is only one (or a few) conversion(s). In my case i want to sample with a high rate (up to 1Msps) and write the data to the external DRAM into a ring buffer.
Thus, to unload the CPU I wanted to use the DMA.

These are some experiments I am doing to find some bottlenecks (maybe the data transfer to the external DRAM is not fast enough, etc.) and to check if such ideas are possible to implement on the XMC4500.

Regards,
EiSa
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi EiSa,

You can give this a try....

1) Set hardware trigger in [DMA002]
2) Right click on [NVIC002] (ADC_ISR) and select signal connection. Then do the necessary connection to DMA.


Best Regards
Travis
0 Likes
User265
Level 1
Level 1
Hallo Travis,
thanks for your quick response.
I already tried this since this is (as I know) the normal way to interconnect two Apps by an interrupt via DAvE. Unfortunatelly, I had no success.
Is there something else I have to take care?

Regards,
EiSa
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
EiSa wrote:
Hallo Travis,
thanks for your quick response.
I already tried this since this is (as I know) the normal way to interconnect two Apps by an interrupt via DAvE. Unfortunatelly, I had no success.
Is there something else I have to take care?

Regards,
EiSa


Hi EiSa,

I have to give this a try.

Best Regards
Travis
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi EiSa,

Can you refer to this example "UART001_Example4" which can be download from ..

http://www.infineon.com/cms/en/product/promopages/aim-mc/DAVE_3_Support_Portal/DAVE_Example_Project_...

Best Regards
Travis
0 Likes