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: 
Highlighted
Contributor
Contributor
769 Views
Registered: ‎03-12-2018

why do I need to program FPGA twice for it to work.??

Jump to solution

Hi there,

In my PL design I have 4 interrupts for PS and I've written code to handle those interrupts in zynq zc702 evaluation board.

 

But the thing is that when I program FPGA and Run my application on hardware, it just executes the main() function and do nothing further. But when I program it for 2nd time and run application on hardware, then the interrupts starts working as expected.

 

Why do I need to program FPGA twice to run my application properly ..??

 

Also when I make Boot.bin to execute(boot) my complete application from SD card, when I switch on the harware it actually behaves the same way as it was behaving after 1st programming from SDK.

 

Can anyone help me to get this working with single programming.? What I feel is I'm missing some setting to make it work properly.

 

Thanks

Lokesh_OEPL

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
877 Views
Registered: ‎09-12-2007

Re: why do I need to program FPGA twice for it to work.??

Jump to solution

What is the boot sequence of your device. For example is it:

program the pl (fpga)

then config the ps

 

How are your interrupts created? are they from an external source, or from a IP that are synchronous to the ps reset?

If from an external source, then the interrupt could have occured before the zynq ps was configured?

 

In your application can you try clear the EOI on the scugic:

 

For example, the line below can be added to the interrupt init in your application:

XScuGic_CPUWriteReg(&InterruptController, XSCUGIC_EOI_OFFSET, XX);

 

(Where XX is the interrupt ID from your xparameters.h)

4 Replies
Moderator
Moderator
878 Views
Registered: ‎09-12-2007

Re: why do I need to program FPGA twice for it to work.??

Jump to solution

What is the boot sequence of your device. For example is it:

program the pl (fpga)

then config the ps

 

How are your interrupts created? are they from an external source, or from a IP that are synchronous to the ps reset?

If from an external source, then the interrupt could have occured before the zynq ps was configured?

 

In your application can you try clear the EOI on the scugic:

 

For example, the line below can be added to the interrupt init in your application:

XScuGic_CPUWriteReg(&InterruptController, XSCUGIC_EOI_OFFSET, XX);

 

(Where XX is the interrupt ID from your xparameters.h)

Xilinx Employee
Xilinx Employee
658 Views
Registered: ‎01-03-2017

Re: why do I need to program FPGA twice for it to work.??

Jump to solution

Hi @lokesh_oepl,

 

Please share the HDF and also the application you are using. So that we can try at our end and it will help us to understand the issue.

 

Thanks & Regards,

Praveen Kumar. V

 

0 Kudos
Contributor
Contributor
624 Views
Registered: ‎03-12-2018

Re: why do I need to program FPGA twice for it to work.??

Jump to solution

Dear @stephenm

 

Thanks for your response.

 

XScuGic_CPUWriteReg(&InterruptController, XSCUGIC_EOI_OFFSET, XX);

 

This line actually worked for me.

 

Thanks

Lokesh_OEPL

 

0 Kudos
Moderator
Moderator
621 Views
Registered: ‎09-12-2007

Re: why do I need to program FPGA twice for it to work.??

Jump to solution

Great!!

0 Kudos