AnsweredAssumed Answered

custom interrupts in no-os software for adv7511

Question asked by bereza on Jul 10, 2015
Latest reply on Jul 15, 2015 by DragosB
Hello,
I would like to add my own custom interrupts to the existing ones in the reference project for the adv7511. Unfortunately the simultaneous use of the precompiled library (no-OS Software) and the Xilinx driver for the Interrupt Controller(intc_v2_06_a) does not work. I can't figure out why, because I can't take a look into the HAL_PlatformInit() function.
Here is the Code which is not working:

 

int InitInterrupts() {

    HAL_PlatformInit(XPAR_IIC_MAIN_BASEADDR,        /* Perform any required platform init */

                     XPAR_AXI_TIMER_0_BASEADDR,        /* including hardware reset to HDMI devices */

                     XPAR_AXI_TIMER_0_INTERRUPT_MASK,

                     XPAR_INTC_0_BASEADDR);

    Xil_ExceptionEnable();

 

//    if (XIntc_Initialize(IntcInstancePtr,XPAR_AXI_INTC_0_DEVICE_ID)!=XST_SUCCESS) {

//        return XST_FAILURE;

//    }

 

    intr_config = XIntc_LookupConfig (XPAR_AXI_INTC_0_DEVICE_ID);

    if (intr_config == NULL)

        return XST_FAILURE;

 

    Intc.CfgPtr = intr_config;

    Intc.IsReady = XIL_COMPONENT_IS_READY;

 

    if (XIntc_Connect(IntcInstancePtr, XPAR_AXI_INTC_0_AXI_VDMA_0_S2MM_INTROUT_INTR,(XInterruptHandler) VideoInterrupt_Handler, (void *) 0)==XST_FAILURE)

        return XST_FAILURE;

    if (XIntc_Connect(IntcInstancePtr, XPAR_AXI_INTC_0_DDR3_AXI_IF_0_FINISHED_O_INTR,(XInterruptHandler) SomeInterrupt_Handler, (void *) 0)==XST_FAILURE)

        return XST_FAILURE;

    if (XIntc_Connect(IntcInstancePtr, XPAR_AXI_INTC_0_AXI_VDMA_0_MM2S_INTROUT_INTR,(XInterruptHandler) VideoOutInterrupt_Handler, (void *) 0)==XST_FAILURE)

        return XST_FAILURE;

 

    XIntc_Enable(IntcInstancePtr, XPAR_AXI_INTC_0_AXI_VDMA_0_S2MM_INTROUT_INTR);

    XIntc_Enable(IntcInstancePtr, XPAR_AXI_INTC_0_DDR3_AXI_IF_0_FINISHED_O_INTR);

    XIntc_Enable(IntcInstancePtr, XPAR_AXI_INTC_0_AXI_VDMA_0_MM2S_INTROUT_INTR);

 

    if (XIntc_Start(IntcInstancePtr, XIN_REAL_MODE)==XST_FAILURE) return XST_FAILURE;

    microblaze_enable_interrupts();

 

    return XST_SUCCESS;

}

 

If I comment out the PlatformInit() function and comment in XIntc_Initialize(), my own Interrupts get recognized and the correct Handlers are called. Of course the Video Output is not working then. If I call both, PlatformInit() and XIntc_Initialize(), my Interrupts do net get recognized and the program hangs. If I then comment out evertything else, for example ADIAPI_TransmitterInit() and everything inside the while(1) loop, the program doesn't hang, but my Interrupts are not recognized. Could you please help me with this problem?

 

Thank you in advance,
Bereza

Outcomes