DMA1 is not working

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,752件の閲覧回数
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.

ラベル(2)
0 件の賞賛
返信
1 解決策
1,564件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,565件の閲覧回数
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 件の賞賛
返信
1,564件の閲覧回数
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 件の賞賛
返信
1,564件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you attend this case?

0 件の賞賛
返信