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
Hi AsafTv
Please let us know your chip part number thus we can assign right engineer to support you.
Thanks,
'Jun Zhang
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
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