DMA Priority

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

DMA Priority

2,494 Views
AsafTv
Contributor II

 

 i use ADC with DMA linked to other DMA that control MUX.

the Multiplexer use to connect 16 input to the ADC.

 

when i use it not work:

const edma_channel_Preemption_config_t ADC_preemption_config = {
.enableChannelPreemption = false,
.enablePreemptAbility = true,
.channelPriority = 15U
};
const edma_channel_Preemption_config_t Channel_preemption_config = {
.enableChannelPreemption = false,
.enablePreemptAbility = true,
.channelPriority = 14U
};

channel = EDMA_SetChannelPreemptionConfig(DMA0, 0, &ADC_preemption_config);

Linked channel = EDMA_SetChannelPreemptionConfig(DMA0, 4, &Channel_preemption_config);

can i set DMA priority when configure as scatter gatter mode?

advice

0 Kudos
Reply
7 Replies

2,393 Views
AsafTv
Contributor II

what can be the reason that the DMA is not start to work when configure priority and it work properly when not configure priority.

the priority configuration exhibit in  the upper message.

advice

0 Kudos
Reply

2,446 Views
AsafTv
Contributor II

mk64f12

0 Kudos
Reply

2,460 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi AsafTv

Please let us know your chip part number thus we can assign right engineer to support you. 

Thanks,

'Jun Zhang

0 Kudos
Reply

2,441 Views
AsafTv
Contributor II

mk64f12

0 Kudos
Reply

2,402 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @AsafTv ,

Yes, I think preemption function does not conflict with scatter-gather mode.

 

Regards,

Jing

0 Kudos
Reply

2,388 Views
AsafTv
Contributor II

what can be the reason that the DMA is not start to work when configure priority and it work properly when not configure priority.

the priority configuration exhibit in  the upper message.

advice

Tags (1)
0 Kudos
Reply

2,372 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @AsafTv ,

Look into your code, I think this should because the DMA is pending by a Channel Priority Error. Each of the priority register has a default priority value, from 0 to 15.  When you change any one of them, it will conflict with other DCHPRIn register. For example, if you change the DCHPRI0[CHPRI] field to 14, it will conflict with DCHPRI14. You can modify your code like this

    const edma_channel_Preemption_config_t Channel_preemption_config = {
    .enableChannelPreemption = false,
    .enablePreemptAbility = true,
    .channelPriority = 14U
    };
    const edma_channel_Preemption_config_t Channel14_preemption_config = {
    .enableChannelPreemption = false,
    .enablePreemptAbility = true,
    .channelPriority = 0U
    };

    EDMA_SetChannelPreemptionConfig(EXAMPLE_DMA, 0, &Channel_preemption_config);
    EDMA_SetChannelPreemptionConfig(EXAMPLE_DMA, 14, &Channel14_preemption_config);

 

Regards,

Jing

0 Kudos
Reply