This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6657 SRIO LSU interrupts fail after doorbell interrupt

My test code base on pdk_c6657_1_1_2_6 SRIO_loopbackDioIsrExample,the doorbell&LSU interrupts rout is configured as follows,

doorbell INTDST(0-3)====>hostInt8====>Hwi vector4
LSU INTDST(4)====>hostInt9 ====> Hwi vector5

1,Open DIO Non-Blocking socket for control READ/WRITE
2,Open DIO Blocking socket for waiting doorbell

I CAN call Srio_sockSend_DIO to READ/WRITE target board and got LSU interrupt(DIO Tx Completion),it will be failure after one doorbell interrupt received, i can see LSU status Int register update to 0x00000001 but myDioTxCompletionIsr NOT fired if Srio_sockSend_DIO fuction was called at this moment.


void myDioTxCompletionIsr(arg)
{
...
Srio_dioTxCompletionIsr(arg1, arg2); // call SRIO drv isr
...
}

void myDioDoorbellCompletionIsr(arg) // be good always if doorbell message received
{
...
Srio_dioCompletionIsr(arg1, arg2); // call SRIO drv isr
...
}

  • Hi Nios Yu,

    LSU status Int register update to 0x00000001 means interrupt is getting triggered at the SRIO peripheral, but it is not be handled correctly at the CIC0 or at the CorePAC0 INTC. Please, try to disabling Doorbell completion interrupts setup part  of your example project SRIO_LoopbackDioIsrexampleproject.

    If the same issue repeat, You can also check the CIC0 system event status register and the input event status at the corePAC0 INTC. Please, refer to the CIC users guide and the C66x CorePAC users guide for details about the event status registers.

    Thanks,

  • i mixed some source code which come form pdk samples for debuging,i found some bad routines

     in osal.c(SRIO_TputBenchmarkingTestProject)It began to look like a mistake:

    /**
    * @b Description
    * @n
    * The function is used to provide critical section to prevent access of shared
    * resources from single core and multiple threads.
    *
    * @param[in] drvHandle
    * Driver Handle which needs critical section to protect its resources.
    *
    * @retval
    * Opaque handle
    */
    Void* Osal_SingleCoreEnter(Srio_DrvHandle drvHandle)
    {
        /* Disable Interrupts. */
        // return (Void*)Hwi_disable();

    #if 1
        /* Pankaj removed this for some reason, but it causes a warning. Will watch to see if this affects throughput. */
        return (Void*)Hwi_disable();
    #endif
    }

    /**
    * @b Description
    * @n
    * The function is called to end the critical section access of shared resources
    * from single cores.
    *
    * @param[in] drvHandle
    * Driver Handle which needed critical section to protect its resources.
    * @param[in] critSectHandle
    * Opaque handle retreived when the Single Core Protection Enter API was called
    *
    * @retval
    * Not Applicable
    */
    Void Osal_SingleCoreExit(Srio_DrvHandle drvHandle, Void* critSectHandle)
    {
        /* Re-enable Interrupts.*/
        // Hwi_enable();
    }

    the HWI will disable when i call Srio_sockRecv to wait doorbell and the HWI will NOT enable after Srio_sockRecv API return!

  • Hi Nios Yu,

    That "SRIO_TputBenchmarkingTestProject example" project will only support polling mode. 

    /* Code has only been tested in polled mode, interrupt mode is not guaranteed or expected to work. */
    bool srio_usePolledMode = TRUE;

    If you want to use interrupts, you can look at the other two examples (C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\srio\example)

    SRIOLoopbackDioIsr is directIO traffic with LSU interrupts

    SRIOMulticoreLoopback is message traffic using accumulator interrupts.

    Thanks,