cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,045 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
1,153 Views
Registered: ‎09-12-2007

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)

View solution in original post

4 Replies
Moderator
Moderator
1,154 Views
Registered: ‎09-12-2007

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)

View solution in original post

Highlighted
Xilinx Employee
Xilinx Employee
934 Views
Registered: ‎01-03-2017

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

Dear @stephenm

 

Thanks for your response.

 

XScuGic_CPUWriteReg(&InterruptController, XSCUGIC_EOI_OFFSET, XX);

 

This line actually worked for me.

 

Thanks

Lokesh_OEPL

 

0 Kudos
Highlighted
Moderator
Moderator
897 Views
Registered: ‎09-12-2007

Great!!

0 Kudos