cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
178 Views
Registered: ‎10-12-2018

XIntc_Initialize hangs at restart

Jump to solution

I want to share my experience with XIntc_Initialize

Use case:

  1. I usually relaunch the software (without reloading the complete FPGA) during development time
  2. I have a watchdog that restarts the software in case of an (unhandled) error.

Problem:

In case of the restart the XIntc_Initialize() function hangs frequently.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
176 Views
Registered: ‎10-12-2018

The solution is to reset the interrupt controller before initializing it. There is no reset function in the handlers (if there is, please inform me) so I collected all of the writable registers and set back the reset values of them.

void reset_irq_ctrl(u32 base){
    // This interrupt disable needed by the restart of the SW.
	XIntc_Out32(base+ XIN_ISR_OFFSET, 0);
	XIntc_Out32(base+ XIN_IPR_OFFSET, 0);
	XIntc_Out32(base+ XIN_IER_OFFSET, 0);
	XIntc_Out32(base+ XIN_IAR_OFFSET, 0);
	XIntc_Out32(base+ XIN_SIE_OFFSET, 0);
	XIntc_Out32(base+ XIN_CIE_OFFSET, 0);
	XIntc_Out32(base+ XIN_MER_OFFSET, 0);
	XIntc_Out32(base+ XIN_IMR_OFFSET, 0);
}

Xilinx employees, please add this reset into the handler functions of the interrupt controller.

I use:

  • Win10
  • Vivado 2017.4

 

View solution in original post

0 Kudos
1 Reply
Highlighted
Explorer
Explorer
177 Views
Registered: ‎10-12-2018

The solution is to reset the interrupt controller before initializing it. There is no reset function in the handlers (if there is, please inform me) so I collected all of the writable registers and set back the reset values of them.

void reset_irq_ctrl(u32 base){
    // This interrupt disable needed by the restart of the SW.
	XIntc_Out32(base+ XIN_ISR_OFFSET, 0);
	XIntc_Out32(base+ XIN_IPR_OFFSET, 0);
	XIntc_Out32(base+ XIN_IER_OFFSET, 0);
	XIntc_Out32(base+ XIN_IAR_OFFSET, 0);
	XIntc_Out32(base+ XIN_SIE_OFFSET, 0);
	XIntc_Out32(base+ XIN_CIE_OFFSET, 0);
	XIntc_Out32(base+ XIN_MER_OFFSET, 0);
	XIntc_Out32(base+ XIN_IMR_OFFSET, 0);
}

Xilinx employees, please add this reset into the handler functions of the interrupt controller.

I use:

  • Win10
  • Vivado 2017.4

 

View solution in original post

0 Kudos