UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
1,970 Views
Registered: ‎10-14-2015

CPU0 with PetaLinux 2017.2 and CPU1 Baremetal - Interrupt not triggered

Hello everyone,

I have an issue with interrupts with openamp configuration:
 
I have a Zynq-7000 processor. The first core runs linux (Petalinux 2017.2) and the second core
runs a bare-metal application.

I use a Triple Timer Counter (ttc 1) to generate interupts periodically.
When running the baremetal without linux and without the OpenAMP configration in the bsp, it works. Interrupt are triggered.
When running the full system (OpenAMP enable in bsp, -DUSE_AMP=1 and Proxy=false, app launch from linux master), interrupts do not trigger.

I know that using the flag -DUSE_AMP=1 affects the interrupt behavior, as it is the master that initialize the interrupts device.
It seems like I don't know how to have the master initialize correctly the interrupts for the timer.

I tried disabling the clock and adding the clk_ignore_unused to boot arguments like specified here: http://www.wiki.xilinx.com/Device+Tree+Tips#Clocks
I used ttc0 and ttc1, none of them works.
Weird: RPMsg, which use IPI, works.

The content of zynq-7000.dtsi for tt timers
ttc0: timer@f8001000 {
        interrupt-parent = <&intc>;
        interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
        compatible = "cdns,ttc";
        clocks = <&clkc 6>;
        reg = <0xF8001000 0x1000>;
};

ttc1: timer@f8002000 {
        interrupt-parent = <&intc>;
        interrupts = <0 37 4>, <0 38 4>, <0 39 4>;
        compatible = "cdns,ttc";
        clocks = <&clkc 6>;
        reg = <0xF8002000 0x1000>;
};


Any ideas or direction I should look at?

0 Kudos
1 Reply
Observer davirol
Observer
1,760 Views
Registered: ‎08-16-2017

Re: CPU0 with PetaLinux 2017.2 and CPU1 Baremetal - Interrupt not triggered

Hi @eric.boutet,

 

We had same problems and we resolved them in the following way. You need to target to which CPU interrupts are mapped. This is done using:

 

XScuGic_InterruptMaptoCpu(&InterruptController, CPU_ID, INTERRUPT_ID); // CPU_ID 0 or 1

 

Hope it helps, regards,

David