Linux interfering with using DMA from M4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux interfering with using DMA from M4

620 Views
DanKSI
Contributor III

Hi,

I would like to use DMA to transfer data using SPI from the M4. I have a process in place where this works, but viewing the output on the scope, the process fails after a period of time (mostly random). Linux is running from the application processor and I thought it may be interfering with the DMA channels used on the M4.


I verified that Linux was interfering with the DMA/SPI transfer by disabling access to DMA for Linux by using the RDC. I viewed the output on a scope and the SPI transfer was complete. When disabling DMA for Linux, Linux crashed, so this isn't a real solution.


What I would like to do is set aside a few channels of the DMA to only be used for the M4. I'm trying to find where in the Linux build that the channel count exists, so that I could limit the end channels to be only used in the M4.

Thanks,

Dan K.

0 Kudos
1 Reply

585 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dan

dma channels allocation can be found in sect.7.1.4 SDMA event mapping

i.MX 8M Mini Applications Processor Reference Manual

DMA usage can be disabled by removing "dma" entries in dts file

(for example for ecspi1 - ecspi1: ecspi@30820000 {..)

fsl-imx8mm.dtsi\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos