cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ant_lipl_7030
Adventurer
Adventurer
793 Views
Registered: ‎04-05-2018

VDMA &Ethernet(lwip) interrupts

HI!

I have design on zynq. My design contain 2 VDMA, and 4 UART, some other cores. I want send video to ethernet, but i have some issue. If i initialization VDMA with interrupt the receiving part of the ethernet stops working. But i must receive control signal. If i work without VDMA's interrupt Video quality deteriorates.

 

int SetupIntrSystem(XAxiVdma *AxiVdmaPtr,     u16 WriteIntrId)
{
    int Status;
    XScuGic *IntcInstancePtr = &Intc;    /* Instance of the Interrupt Controller */
    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;
    }
    XScuGic_SetPriorityTriggerType(IntcInstancePtr, WriteIntrId, 0xA0, 0x3);
    Status = XScuGic_Connect(IntcInstancePtr, WriteIntrId,
                (Xil_InterruptHandler)XAxiVdma_WriteIntrHandler,
                AxiVdmaPtr);
    if (Status != XST_SUCCESS) {
        return Status;
    }
    XScuGic_Enable(IntcInstancePtr, WriteIntrId);
    Xil_ExceptionInit();
    Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_IRQ_INT,
                (Xil_ExceptionHandler)XScuGic_InterruptHandler,
                IntcInstancePtr);    
    Xil_ExceptionEnable();
    XAxiVdma_SetCallBack(&AxiVdma_1, XAXIVDMA_HANDLER_GENERAL,
            WriteCallBack_1, (void *)&AxiVdma_1, XAXIVDMA_WRITE);
        XAxiVdma_SetCallBack(&AxiVdma_1, XAXIVDMA_HANDLER_ERROR,
            WriteErrorCallBack_1, (void *)&AxiVdma_1, XAXIVDMA_WRITE);
        XAxiVdma_IntrEnable(&AxiVdma_1, XAXIVDMA_IXR_ALL_MASK, XAXIVDMA_WRITE);


}
Xil_ExceptionInit();
    XScuGic_DeviceInitialize(INTC_DEVICE_ID);
    Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_IRQ_INT,
            (Xil_ExceptionHandler)XScuGic_DeviceInterruptHandler,
            (void *)INTC_DEVICE_ID);
    XScuGic_RegisterHandler(INTC_BASE_ADDR, TIMER_IRPT_INTR,
                    (Xil_ExceptionHandler)timer_callback,
                    (void *)&TimerInstance);
    XScuGic_EnableIntr(INTC_DIST_BASE_ADDR, TIMER_IRPT_INTR); 
        Xil_ExceptionEnableMask(XIL_EXCEPTION_IRQ);
    XScuTimer_EnableInterrupt(&TimerInstance);
    XScuTimer_Start(&TimerInstance);

And maybe somebody explain difference between function  initialization interrupt

XScuGic_CfgInitialize

and

XScuGic_DeviceInitialize

Please help me tune in interrupt in my design.

 

Thanks for your attention and help!

0 Kudos
2 Replies
pvenugo
Moderator
Moderator
704 Views
Registered: ‎07-31-2012

Hi @ant_lipl_7030,

 

XScuGic_CfgInitialize  is the high level function to initialize the GIC (interrupt controller) in PS drivers so that user can go ahead to use it on application. Whereas, XScuGic_DeviceInitialize is low level function that has device ID as its argument to initialize the interrupt controller device without calling XScuGic_CfgInitialize.

 

Let me know if you need further help.

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
ant_lipl_7030
Adventurer
Adventurer
696 Views
Registered: ‎04-05-2018

HI,@pvenugo!

Thank's for your answer!

I want ansk one question. If i set up interrupts for several devise in my program, won't they  interfere with each other?

And is there a difference in what function to initialize interrupts? How do this correct.

0 Kudos