DMA Priority

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DMA Priority

2,496 次查看
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 项奖励
回复
7 回复数

2,395 次查看
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 项奖励
回复

2,448 次查看
AsafTv
Contributor II

mk64f12

0 项奖励
回复

2,462 次查看
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 项奖励
回复

2,443 次查看
AsafTv
Contributor II

mk64f12

0 项奖励
回复

2,404 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi @AsafTv ,

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

 

Regards,

Jing

0 项奖励
回复

2,390 次查看
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

标记 (1)
0 项奖励
回复

2,374 次查看
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 项奖励
回复