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

PSoC™ 6

GaLo_4308236
Level 1
First like given
Level 1

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?

0 Likes
1 Solution
AchimE_41
Employee
5 sign-ins First comment on KBA 100 replies posted
Employee

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

View solution in original post

6 Replies
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

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 -

ce218553-psoc-r-6-mcu-pwm-triggering-dma-channel

0 Likes
AchimE_41
Employee
5 sign-ins First comment on KBA 100 replies posted
Employee

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

GaLo_4308236
Level 1
First like given
Level 1

Exactly what I was asking for.

Any example that shows descriptor chaining to achieve larger DMA transfers like this?

0 Likes
AchimE_41
Employee
5 sign-ins First comment on KBA 100 replies posted
Employee

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

0 Likes
GaLo_4308236
Level 1
First like given
Level 1

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.

0 Likes
JamesT_21
Moderator
Moderator 100 likes received 50 likes received 25 likes received
Moderator

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

Top labels