cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Nizlas
Observer
Observer
383 Views
Registered: ‎08-26-2020

AXI DMA Interrupt on completion in Petalinux

Hello everyone,

 

I am using Petalinux on a XC7Z014S to transfer data from PL to PS via AXI DMA. To let the PS know, when data is written to the memory and can be processed by the PS, I would like to use an interrupt. I guess s2mm_introut of AXI DMA IP is the right one to do this. Anyhow, if you know a better way to solve this, I am open-minded for other ideas.

In /proc/interrupts xilinx-dma-controller is already listed with the correct interrupt number, but I do not know how to arm and use the interrupt.

In Petalinux I use this driver:

https://github.com/bperez77/xilinx_axidma

 

Transfering data through dma is working fine, but I can only estimate, when the PS can start to read from memory.

Any help is highly appreciated.

 

Best regards

0 Kudos
2 Replies
abommera
Xilinx Employee
Xilinx Employee
323 Views
Registered: ‎10-12-2018

Hi @Nizlas ,

Yes, s2mm_intout would be the one to transfer the interrupt to PS. The interrupt would be triggered upon completion of the transaction. You can refer to the provided proxy dma example for the callback function in below wiki page.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space

 

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Nizlas
Observer
Observer
276 Views
Registered: ‎08-26-2020

Hi @abommera,

thanks for your response.

But I am not sure if figured out, how an interrupt is handled in dma-proxy-test.c. Is it done with the blocking call of the ioctl function? I also had a look on the DMA Proxy Driver and I am not sure, whether I have to switch from my current driver to the DMA Proxy Driver to make it work.

Is there a non-blocking way to use the interrupt on s2mm_introut?

 

Best regards

 

0 Kudos