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
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.
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.
Hi @hanmant,
Could you be more specific? Where does the application get stuck? Do you receive a hardfault, or what kind of error do you get?
BR,
Edwin.
Hi @hanmant,
That seems to be the case. Is there a reason why you require this priority related code if the application works fine without it? Why not keep the code without this part if it works OK?
Hi @hanmant,
As I previously mentioned, you can change the DMA's priority for each channel by using the DCHPRIn register. Have you tried using this to set up a higher priority for UART than the rest of the DMA channels?
BR,
Edwin.
Hi @EdwinHz
I'm still waiting for my answer.
Can you please tell how you tried at your end by taking I2C and Uart DMA and setting the priority to UART dma channel as High using the DCHPRIn registers.
Please give me example code.
Hi @hanmant,
Please take a look at the "evkmimxrt1020_lpuart_edma_transfer" example code from the RT1020 SDK for aid on how to setup the dma + uart connection.
BR,
Edwin.
Your not responding to my question since long time.