DMA1 is not working

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

DMA1 is not working

Jump to solution
681 Views
x_dex
Contributor I

I tried to toggle a pin with the a DMA triggered by a timer. With DMA0 it works properly but if I try to do the same with DMA1 it doesn’t work. DMA0 and 1 have the equal settings. I work with the A5 processor of TWR-VF65GS10 development tower debugged by DS-5 tool. I used the Processor Expert tool to generate the DMA init code.

Labels (2)
0 Kudos
1 Solution
493 Views
RossMcLuckie
NXP Employee
NXP Employee

There is a difference in the set up in DMA0 and DMA1 when using the DMA mux, please see the following -

Following are the key differences,

1) During TCD configuration of DMA0, say if channel N(0<=N<=16) of DMA_CH_MUX0 has been used, we are going to program all TCD(N) of DMA0

But for DMA1, since DMA_CH_MUX3 has been used, and say if channel N (0<=N<=16) of DMA_CH_MUX3 has been used, we would be programming TCD(N+16) registers of DMA1

The following piece of code can illustrate it,

if(DMA_CH_MUX_NO == 1 || DMA_CH_MUX_NO ==3) {
channel_num = channel_num + 16;
}


#define DMA_TCD_ADDR  (SPP_DMA20_BASEADDRESS + 0x1000) + (0x20 * channel_num) + ((DMA_NO)*0x80000) ; // DMA_NO is 0 or 1

PROGRAM DMA TCD registers

2) FOR DMA_CH_MUX configuration, programming is tantamount, but for first case we program DMA_CH_MUX0, and for the other case, we program DMA_CH_MUX3

So, to summarize, the cardinal thing to take care,

DMA0 + DMA_CH_MUX0 - Program channel N in DMA_CH_MUX, N in DMA

DMA0 + DMA_CH_MUX1 - Program channel N in DMA_CH_MUX, (N+16) in DMA


DMA1 + DMA_CH_MUX2 - Program channel N in DMA_CH_MUX, N in DMA
DMA1 + DMA_CH_MUX3 - Program channel N in DMA_CH_MUX, (N+16) in DMA

View solution in original post

0 Kudos
3 Replies
494 Views
RossMcLuckie
NXP Employee
NXP Employee

There is a difference in the set up in DMA0 and DMA1 when using the DMA mux, please see the following -

Following are the key differences,

1) During TCD configuration of DMA0, say if channel N(0<=N<=16) of DMA_CH_MUX0 has been used, we are going to program all TCD(N) of DMA0

But for DMA1, since DMA_CH_MUX3 has been used, and say if channel N (0<=N<=16) of DMA_CH_MUX3 has been used, we would be programming TCD(N+16) registers of DMA1

The following piece of code can illustrate it,

if(DMA_CH_MUX_NO == 1 || DMA_CH_MUX_NO ==3) {
channel_num = channel_num + 16;
}


#define DMA_TCD_ADDR  (SPP_DMA20_BASEADDRESS + 0x1000) + (0x20 * channel_num) + ((DMA_NO)*0x80000) ; // DMA_NO is 0 or 1

PROGRAM DMA TCD registers

2) FOR DMA_CH_MUX configuration, programming is tantamount, but for first case we program DMA_CH_MUX0, and for the other case, we program DMA_CH_MUX3

So, to summarize, the cardinal thing to take care,

DMA0 + DMA_CH_MUX0 - Program channel N in DMA_CH_MUX, N in DMA

DMA0 + DMA_CH_MUX1 - Program channel N in DMA_CH_MUX, (N+16) in DMA


DMA1 + DMA_CH_MUX2 - Program channel N in DMA_CH_MUX, N in DMA
DMA1 + DMA_CH_MUX3 - Program channel N in DMA_CH_MUX, (N+16) in DMA

0 Kudos
493 Views
timesyssupport
Senior Contributor II

Hello Juergen,

Can you share some more information about the program you are running? Is it built from the MQX 4.0.2 Installer for Linux hosts, or something else? Which settings for DMA0 and 1 are you referring to?

Thanks,

Timesys Support

0 Kudos
493 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you attend this case?

0 Kudos