UART interrupt code stop at Xil_ExceptionEnable();

Status
Not open for further replies.

aminpix

Advanced Member level 4
Joined
Sep 30, 2008
Messages
108
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,344
I am trying to develop a code to receive a a character through the serial port in interrupt fashion.
everything works except the code stop at Xil_ExceptionEnable();
when I enter a character, the rest of the code executes and everything works fine. When I upload the code into the Zynq FPGA, the Zynq execute all the command till reach this command, Xil_ExceptionEnable(). It will wait until I enter a character then the zynq execute the rest of the codes.

here is my code to initialise the interrupt:

C++:
int GIC_Init(XUartPs *UartInstancePtr, XScuGic *IntcInstancePtr)
{
    int Status;
    XScuGic_Config *IntcConfig;
    IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
    if (NULL == IntcConfig) {
        return XST_FAILURE;
    }
    Status = XScuGic_CfgInitialize(IntcInstancePtr, IntcConfig,
                    IntcConfig->CpuBaseAddress);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }
    Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
                (Xil_ExceptionHandler) XScuGic_InterruptHandler,
                IntcInstancePtr);
    Status = XScuGic_Connect(IntcInstancePtr, UART_INT_IRQ_ID,
                  (Xil_ExceptionHandler) UART_Handler,
                  (void *) UartInstancePtr);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }
    XScuGic_Enable(IntcInstancePtr, UART_INT_IRQ_ID);
    Xil_ExceptionEnable();
    return XST_SUCCESS;
Code:
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…