cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
talvlad29
Observer
Observer
1,182 Views
Registered: ‎05-28-2019

APU with LInux and RPU with baremetal - Interrupt issue

Jump to solution

Hello,

I'm faced with issue related to the interrupts with running openamp configuration:
 
I have a board from Avnet Ultra96v2 with Zynq UltraScale+ MPSoC. The APU cores have linux (Petalinux 2019.2) and the first RPU core
runs as a bare-metal application.

I use an AXI_DMA Controllers in PL (dma0, 1, 2 with external interrupts id 121, 122, 123) to generate interrupts and libmetal v2.1 to share data (RPU<-->APU).
If I launch the bare-metal app on RPU w/o linux it works (I use Vitis Single App Debugger on Hardware). DMA interrupts are generated and app runs correctly.

However, if I run the full system (I use remoteproc to load RPU app and monitor RPU with Client app from Linux, Proxy=false), interrupts are generated by DMA only once and there are no more interrupts from DMAs. The data related to the first interrupt are valid (first block). RPU app is running (I see messages from RPU but there is no more DMA interrupts).

What can cause this issue?

Thank you in advance,

Vladimir

 

Tags (1)
Interrupts.PNG
0 Kudos
1 Solution

Accepted Solutions
mrbietola
Scholar
Scholar
1,010 Views
Registered: ‎05-31-2012

if you are configuring the DMA from RPU, Linux shouldn't access that so you disable that in the system-user.dtsi (i don't know what happens to your interrupts if you do so)

 

I think actually this design works for you because you wake up the RPU AFTER linux has already reset your DMA and you are able to configure it with the RPU.

If you put the RPU code into the BOOT.BIN file instead of using remoteproc, (so RPU will wake before linux) you run into the problem i described

View solution in original post

0 Kudos
5 Replies
jovitac
Moderator
Moderator
1,149 Views
Registered: ‎05-10-2017

You will need to delete the dma nodes from the Linux device-tree so that Linux does not use it. Please see forum post here with similar issue 

https://forums.xilinx.com/t5/Processor-System-Design-and-AXI/Why-PS-DMA-run-by-RPU-does-not-work-successfully-while-RPU/m-p/1146496

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
talvlad29
Observer
Observer
1,124 Views
Registered: ‎05-28-2019

Thank you for your response.

I removed all lpd_dma nodes (and fpd_dma in the next iteration) as you suggested but the problem is still there. I receive only one DMA interrupt (see log image).

BTW, I do not understand why I have to remove lpd_dma if I do not use them at all (zynqmp-dma are mapped to different interrupts).

One more question, I see a message "DMA mask not set" in bootlog file. What does it mean?

Thank you,

Vladimir

Interrupts2.PNG
Bootlog.PNG
0 Kudos
mrbietola
Scholar
Scholar
1,044 Views
Registered: ‎05-31-2012

you need to remove the DMA you are using in the PL, if you don't do this, linux will reset them

for example in the system-user.dtsi file add

vid_in_vdma_0: dma@a0080000 {
		status = "disabled";
		};

  

0 Kudos
talvlad29
Observer
Observer
1,021 Views
Registered: ‎05-28-2019

I don't know if my solution is correct or not but I changed AXI_DMA interrupt configuration (file pl.dtsi) from "high level triggered" (interrupts=<0 89 4>) to "rising edge triggered" (interrupts=<0 89 1>) and it works.

Should I additionally update my system-user.dtsi file as you suggested?

 

0 Kudos
mrbietola
Scholar
Scholar
1,011 Views
Registered: ‎05-31-2012

if you are configuring the DMA from RPU, Linux shouldn't access that so you disable that in the system-user.dtsi (i don't know what happens to your interrupts if you do so)

 

I think actually this design works for you because you wake up the RPU AFTER linux has already reset your DMA and you are able to configure it with the RPU.

If you put the RPU code into the BOOT.BIN file instead of using remoteproc, (so RPU will wake before linux) you run into the problem i described

View solution in original post

0 Kudos