How to change priority of dma controller RT1020

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

How to change priority of dma controller RT1020

94件の閲覧回数
hanmant
Contributor III

Hi,

I'm using Rt1020 processor.

I want make high priority uart dma than than the cpu .

And also make the uart than Spi dma or cmsis interrupt 

Also in uart dma want make Rx priority high.

I

Can you please give me suggestions 

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

75件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @hanmant,

You can change the priority of each eDMA channel by setting its respective DCHPRIn register. The priorities go from the lowest one of '0' to the highest one of '15'. I believe what you are looking for is to set the DCHPRI register of your UART channel to the highest possible value of 15. For more information, please look at Section "6.5.5.18 Channel Priority (DCHPRI0 - DCHPRI31)" of the RT1020RM.

BR,
Edwin.

0 件の賞賛
返信

64件の閲覧回数
hanmant
Contributor III
Hi @Edwin,

Thanks for reply .
I want give more priority to DMA controller over CPU .
Can you tell me the API's to set it.
0 件の賞賛
返信

55件の閲覧回数
hanmant
Contributor III
Also how to change the priority of Uart DMA over SPI
0 件の賞賛
返信

44件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @hanmant,

I'm afraid that the DMA cannot have a higher priority than the CPU itself.

If you wish to better manage the priorities between peripherals, I highly suggest you use FreeRTOS instead of BareMetal. In BareMetal, all you can achieve is what I previously shared with you about the DMA priorities; there is no way of changing peripheral priorities.

With FreeRTOS, you can set priorities for each task, and with a task for each peripheral, you can set priorities for each peripheral.

Please look into the FreeRTOS example codes we provide on the RT1020 SDK for more information on how to set task priorities.

BR,
Edwin.

0 件の賞賛
返信

27件の閲覧回数
hanmant
Contributor III
Hi @Edwin,
Can we using this api at least for dma ,
// Set DMA channel preemption configuration
preemptionConfig.enableChannelPreemption = true;
preemptionConfig.enablePreemptAbility = true;
preemptionConfig.channelPriority = 14; // Set priority to 14 for TX channel
EDMA_SetChannelPreemptionConfig(EXAMPLE_LPUART_DMA_BASEADDR, LPUART_TX_DMA_CHANNEL, &preemptionConfig);

preemptionConfig.channelPriority = 15; // Set priority to 15 for RX channel
EDMA_SetChannelPreemptionConfig(EXAMPLE_LPUART_DMA_BASEADDR, LPUART_RX_DMA_CHANNEL, &preemptionConfig);

Please confirm.
0 件の賞賛
返信