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: 
Observer hujiang
Observer
5,245 Views
Registered: ‎11-29-2012

How to use fast interrupt ?

 I see the irq sinal come into the cpu interrupt ,but cpu does not do any Response.The sinal wave is in  Figure 1

I've set up the hardware.My interrupt  is in the Figure 2。My  code in SDK is:

 

 XIntc_Initialize(&intc, XPAR_AXI_INTC_3_DEVICE_ID);


 XIntc_ConnectFastHandler(&intc, XPAR_AXI_INTC_3_NOC_IF_3_USERLOGIC2MB_INTREVENT_INTR,(XFastInterruptHandler)noc_data_transport_Intr_DefaultHandler);


  XIntc_Start(&intc, XIN_REAL_MODE);


 XIntc_Enable(&intc, XPAR_AXI_INTC_3_NOC_IF_3_USERLOGIC2MB_INTREVENT_INTR);


 Xil_ExceptionInit();


 Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT, (Xil_ExceptionHandler)

noc_data_transport_Intr_DefaultHandler, &intc);


 Xil_ExceptionEnable();

 

void noc_data_transport_Intr_DefaultHandler()

{
 u32 i,a;
  for (i=0;i<16;i++){
   a=  *((u32 *)XPAR_NOC_IF_3_S_AXI_MEM0_BASEADDR +i);
  }

}

 

 

 

 Is there some wrong with my code ?Can anyone give me some

2.JPG
0 Kudos
4 Replies
Observer hujiang
Observer
5,244 Views
Registered: ‎11-29-2012

Re: How to use fast interrupt ?

My hard  ware sets as

1.JPG
0 Kudos
Highlighted
Observer hujiang
Observer
5,221 Views
Registered: ‎11-29-2012

Re: How to use fast interrupt ?

No one knows this?

0 Kudos
Xilinx Employee
Xilinx Employee
5,216 Views
Registered: ‎08-06-2007

Re: How to use fast interrupt ?

Hi,

 

Replies will be slow from me during the holiday breakoff.

 

Have you enabled Interrupts on MicroBlaze?

 

Göran

0 Kudos
Observer hujiang
Observer
5,192 Views
Registered: ‎11-29-2012

Re: How to use fast interrupt ?

Hi:

Thank you !

     I have find the error!  My  interrupt  hardware is Connected wrong.I have run perfectly with one interrupt ,but when my interrupt controller Connectes with two external interrupt, one interrupt does not response.I find that one Interrupt

is not  enabled.When I use  "XIntc_ConnectFastHandler" step into:    XIntc_Out32(InstancePtr->BaseAddress + XIN_IVAR_OFFSET + (Id * 4), (u32) Handler);  it clears my first interrupt enable register.

    I have choose Interrupt Pending Register ,but I  find my  interrupt pending register is 0.The IPR is a read only register.

I think it should be 3 since I have two external interrupt. I have encountered this problem a few days.

    My EDK  is Xilinx EDK 14.2 and my chip is xilinx.com vc707 Rev B.

 

 My code:


     SetUpInterruptSystem(&InterruptController, XPAR_AXI_INTC_1_DEVICE_ID);
     acc_data_transport_1_interrupt_enable(&InterruptController);
     noc_data_transport_1_interrupt_enable(&InterruptController);

 

int SetUpInterruptSystem(XIntc *XIntcInstancePtr,u16 DeviceId)
{
   XIntc_Initialize(&InterruptController, DeviceId);
   Xil_ExceptionInit();
   Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
    (Xil_ExceptionHandler)XIntc_InterruptHandler, XIntcInstancePtr);
    Xil_ExceptionEnable();
    microblaze_enable_interrupts();
   return XST_SUCCESS;

}

int noc_data_transport_1_interrupt_enable(XIntc *XIntcInstancePtr)
{
    XIntc_ConnectFastHandler(XIntcInstancePtr, XPAR_AXI_INTC_1_NOC_IF_1_USERLOGIC2MB_INTREVENT_INTR,
            (XFastInterruptHandler) noc_transport_IntrHandler);
    S XIntc_Start(XIntcInstancePtr, XIN_REAL_MODE);
    XIntc_Enable(&InterruptController, XPAR_AXI_INTC_1_NOC_IF_1_USERLOGIC2MB_INTREVENT_INTR);
    return XST_SUCCESS;
}

int acc_data_transport_1_interrupt_enable(XIntc *XIntcInstancePtr)
{
    XIntc_ConnectFastHandler(XIntcInstancePtr, XPAR_AXI_INTC_1_ACC_IF_1_USERLOGIC2MB_INTREVENT_INTR,
          (XFastInterruptHandler)acc_transport_IntrHandler);
    XIntc_Start(XIntcInstancePtr, XIN_REAL_MODE);
    XIntc_Enable(&InterruptController, XPAR_AXI_INTC_1_ACC_IF_1_USERLOGIC2MB_INTREVENT_INTR);
   return XST_SUCCESS;
}

 
void noc_transport_IntrHandler(){
 noc_transport = 1;
}
void acc_transport_IntrHandler() {
 acc_transport = 1;
}

 

 

0 Kudos