Modify settings of a DMA channel by anothers DMA channel operation

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

cross mob
immanuel
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello,

Are there any restrictions in using DMA configuration registers (of another channel or maybe even of the same channel but another td) as destination for a DMA transfer?

I want to modify the configuration of a DMA channel (source and destination settings in td's especially) on the fly, not done by software but by (another) DMA channel, of course not during ongoing request using this data.

Devices I use are of 54xx, 56xx and 58xx series.

Thanks.

0 Likes
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Immanuel,

What you are asking is a very advanced technique (if possible).   I'm familiar with operating with the PSoC5 DMA but this one stumps me.  I'm interested what Cypress/Infineon or another advanced DMA user has to say on this issue.

I can see the advantage of modifying the DMA properties "on-the-fly".   Normally this can be done in the code (not by DMA action) and it requires stopping or having the channel complete before redefining a channel's DMA operation.

There are transfer methods called "Indexed" and "Nested".  I'm assuming this is not what you were looking for.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

4 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @immanuel

 

There are no limitations to doing this, but the main problem is that the entire dma structure must be configured again. Setting the preserveTDs (in ChEnable) will not work as all the configurations would be reconfigured by the component. So, the preserveTDs must be disabled and you will require multiple TDs to reconfigure, as the DMA structures are not continuous. 

 

The easiest approach would be to trigger an interrupt and configure the DMA using the CPU, but configuration using TDs could also work.

 

Best regards, 
Hari

Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Immanuel,

What you are asking is a very advanced technique (if possible).   I'm familiar with operating with the PSoC5 DMA but this one stumps me.  I'm interested what Cypress/Infineon or another advanced DMA user has to say on this issue.

I can see the advantage of modifying the DMA properties "on-the-fly".   Normally this can be done in the code (not by DMA action) and it requires stopping or having the channel complete before redefining a channel's DMA operation.

There are transfer methods called "Indexed" and "Nested".  I'm assuming this is not what you were looking for.

Len
"Engineering is an Art. The Art of Compromise."

I should have read the application note first. Methods called "Indexed" and "Nested" are exactly what I thought of - especially as I have to modifiy TDs only, not channels.

Thanks @Len_CONSULTRON for pointing me to that.

0 Likes
immanuel
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

At first, thank you for your quick response.

I am aware that what I want to do is a bit advanced (as you say). (I'm indeed working on stuff like that for many years but never worked with PSoC until now.)

@Hari : I'm not sure that I fully understand your answer.
I wanted to initialize the TDs to be modified (as well as all other TDs I need) with preserveTDs set - to achieve that they are reserved and untouched by other DMA API functions.

During operation I want to use the related register addresses in peripheral space (PHUB_TDMEM or similar) as destination addresses of another DMA channel operation, propably with multiple TDs as these addresses are not contiguous. These register write operations of course only occour when the TDs are not in use and there is no ongoing request in the channel as well.

Am I understanding you right that this is not sufficient to just modify the TDs register to modify further usage/operation of that TD?

I must confess that I haven't studied the TRM yet.

0 Likes