DMA Priority

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DMA Priority

2,763件の閲覧回数
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,662件の閲覧回数
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,715件の閲覧回数
AsafTv
Contributor II

mk64f12

0 件の賞賛
返信

2,729件の閲覧回数
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,710件の閲覧回数
AsafTv
Contributor II

mk64f12

0 件の賞賛
返信

2,671件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @AsafTv ,

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

 

Regards,

Jing

0 件の賞賛
返信

2,657件の閲覧回数
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,641件の閲覧回数
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 件の賞賛
返信