- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like a single X loop of DMA transfers tops out at 256?
Does this mean updating the DMA config, in thread or interrupt context, before the transfer completes;
such that the source address is moved to the address where the current complete transfer will end?
Solved! Go to Solution.
- Tags:
- psoc 6 dma
- pwm
- tcpwm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can use a YX loop that way you can increment the source address in each Y loop by 256 and the Y loop can run also 256 times.
So you can cover 256*256=~65k transfers with a single descriptor.
If that isn't enough, you can build a chain of different descriptors, that are executed after each other, resulting in an almost infinite amount of data transfers.
Achim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the max number of data elements for X loop is 256.
Not quite clear about the details of your question. Anyway, it's not recommended to update the DMA config while the current transfer is executing.
Below is a code example demonstrating a data flow from RAM to PWM through DMA. Maybe it's helpful to your application -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can use a YX loop that way you can increment the source address in each Y loop by 256 and the Y loop can run also 256 times.
So you can cover 256*256=~65k transfers with a single descriptor.
If that isn't enough, you can build a chain of different descriptors, that are executed after each other, resulting in an almost infinite amount of data transfers.
Achim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exactly what I was asking for.
Any example that shows descriptor chaining to achieve larger DMA transfers like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I dont think there is an example yet, so I have attached a simple mockup with hardware configuration for both single DMA using two descriptors and two DMA channels chained together using the trigger input/output signals.
Software is just limited to a simple setup of the addresses for the rest there should be no difference to regular DMAs.
regards,
Achim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Example is helpful. I'm close.
However for my own and others future reference do you have an example handy for the Modus IDE?
I'm using the PSOC 6 Wi-Fi BT Prototype Board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a DMA example for the WiFi-BT prototype kit. Download or clone the example repository from GitHub
https://github.com/cypresssemiconductorco/Code-Examples-for-the-ModusToolbox-PSoC-6-SDK
That puts all the examples in a folder/repository on your machine. Look for CE218552 in the example repo. It is built for ModusToolbox 1.1 and the WiFi-BT prototype kit and won't work for the other kits.
I'll reply more extensively about porting an example to another kit on the GitHub issue on this topic.
HTH!
Jim