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.

FFTC_0和FFTC_1同时打开之后,Rx_1打不开。



老师好:

       我在将FFTC_0和FFTC_1同时打开之后,并且配置好Rx后,Rx_0可以打开,但是Rx_1打不开,请老师帮我看一下是哪一块错了,非常感谢!

程序如下:

// Fftc_open 程序

Int32 fftc_setup
(
    UInt32                  coreNum,
    UInt8                   fftcInstNum_0,
    UInt8                   fftcInstNum_1
)
{
    Fftc_RetVal             retVal;
    Fftc_DrvCfg             fftcInitCfg;
    Fftc_DrvCfg             fftcInitCfg_1;
    /* Setup the FFTC Driver Init Descriptor Params */        
    /* CPPI library gives all the memory regions in the order
     * of insertion, for now let's assume we got Mem region
     * 0 for Host.
     */
    fftcInitCfg.cppiNumFreeDescCfg                  =   2;
    fftcInitCfg.cppiFreeDescCfg[0].descMemRegion    =   0;
    fftcInitCfg.cppiFreeDescCfg[0].numDesc          =   FFTC_NUM_HOST_DESC/NUM_CORES;
    fftcInitCfg.cppiFreeDescCfg[0].descSize         =   FFTC_SIZE_HOST_DESC;
    fftcInitCfg.cppiFreeDescCfg[0].descType         =   Cppi_DescType_HOST;

    /* Setup the descriptors required by this app and
     * open the driver.
     */

    hFFTC_0 = Fftc_open (fftcInstNum_0, &fftcInitCfg, &retVal);
    if (retVal == FFTC_RETVAL_SUCCESS)
    {
        System_printf ("[Core %d]: FFTC_0 successfully opened \n", coreNum);
    }
    else
    {
        System_printf ("[Core %d]: FFTC_0 open failed \n", coreNum);
        return -1;
    }

    hFFTC_1 = Fftc_open (fftcInstNum_1, &fftcInitCfg, &retVal);
    if (retVal == FFTC_RETVAL_SUCCESS)
    {
         System_printf ("[Core %d]: FFTC_1 successfully opened \n", coreNum);
    }
    else
    {
         System_printf ("[Core %d]: FFTC_1 open failed \n", coreNum);
         return -1;
    }
    /* FFTC driver global setup done. Return success. */
    return 0;
}

//配置 并打开Rx程序:

memset (&rxCfg_0, 0, sizeof (rxCfg_0));
rxCfg_0.useFlowId = -1;
rxCfg_0.bManageRxFlowCfg = 1; /* Let the driver do Rx FDQ management */
rxCfg_0.rxFlowCfg.drvCfg.descType = Cppi_DescType_HOST;
rxCfg_0.rxFlowCfg.drvCfg.cppiNumDesc = 2;
rxCfg_0.rxFlowCfg.drvCfg.bufferSize = (pFFTAppCfg->numOutputSamples * FFTC_SAMPLE_SIZE + 4) * pFFTAppCfg->numBlocks + 4;
rxCfg_0.rxFlowCfg.drvCfg.bPSInfoPresent = 0;
rxCfg_0.rxFlowCfg.drvCfg.psLocation = Cppi_PSLoc_PS_IN_SOP;
rxCfg_0.cppiRxQNum = myQNum_0; //myQNum_0
rxCfg_0.bUseInterrupts = 1;
rxCfg_0.bManageAccumList = 1; /* Let driver do the ISR/Accum handling */
rxCfg_0.accumCfg.drvCfg.bEnablePacing = 0;
rxCfg_0.accumCfg.drvCfg.intThreshold = 1;
rxCfg_0.accumCfg.drvCfg.accChannelNum = accChanNum_0;//accChanNum_0
rxCfg_0.bBlockOnResult = 1;

/* Get a Rx Object Handle 获取Rx对象句柄 */
if ((hRxObj_0 = Fftc_rxOpen (hFFTC_0, &rxCfg_0)) == NULL)
{
System_printf ("[Core %d]: 0 Rx object open failed \n", coreNum);
goto error;
}
else
{
System_printf ("[Core %d]: 0 Rx flow %d opened successfully using Rx queue %d \n", coreNum,
Fftc_rxGetFlowId (hRxObj_0), Fftc_rxGetRxQueueNumber (hRxObj_0));
}

memset (&rxCfg_1, 0, sizeof (rxCfg_1));
rxCfg_1.useFlowId = -1;
rxCfg_1.bManageRxFlowCfg = 1; /* Let the driver do Rx FDQ management */
rxCfg_1.rxFlowCfg.drvCfg.descType = Cppi_DescType_HOST;
rxCfg_1.rxFlowCfg.drvCfg.cppiNumDesc = 2;
rxCfg_1.rxFlowCfg.drvCfg.bufferSize = (pFFTAppCfg->numOutputSamples * FFTC_SAMPLE_SIZE + 4) * pFFTAppCfg->numBlocks + 4;
rxCfg_1.rxFlowCfg.drvCfg.bPSInfoPresent = 0;
rxCfg_1.rxFlowCfg.drvCfg.psLocation = Cppi_PSLoc_PS_IN_SOP;
rxCfg_1.cppiRxQNum = myQNum_1; //myQNum
rxCfg_1.bUseInterrupts = 1;
rxCfg_1.bManageAccumList = 1; /* Let driver do the ISR/Accum handling */
rxCfg_1.accumCfg.drvCfg.bEnablePacing = 0;
rxCfg_1.accumCfg.drvCfg.intThreshold = 1;
rxCfg_1.accumCfg.drvCfg.accChannelNum = accChanNum_1; //accChanNum
rxCfg_1.bBlockOnResult = 1;
if ((hRxObj_1 = Fftc_rxOpen (hFFTC_1, &rxCfg_1)) == NULL)
{
System_printf ("[Core %d]: 1 Rx object open failed \n", coreNum);
goto error;
}
else
{
System_printf ("[Core %d]: 1 Rx flow %d opened successfully using Rx queue %d \n", coreNum,
Fftc_rxGetFlowId (hRxObj_1), Fftc_rxGetRxQueueNumber (hRxObj_1));
}