Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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,337
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top