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 output wrong result or no responce

Hi,

I'am using FFTC in a single core application. The code almost identical to the FFTC_Simple_testProject. If the  rxCfg.bBlockOnResult     bit is set to 1 during the debug the application just wait forever for the result at this stage:

if ((retVal = Fftc_rxGetResult (hRxObj,
&hResultInfo,
&pResultBuffer,
&resultLen,
&pResultPSInfo,
&rxPSInfoLen,
&rxFlowId,
&rxSrcId,
&rxDestnTagInfo
)) != FFTC_RETVAL_SUCCESS)
{
Fftc_osalLog ("[Core %d]: Invalid FFT result : %d \n", coreNum, retVal);
goto error;
}

The retVal is always -4, which is meant that there is no pending FFT result available for the application's Rx object. The Rx object created successfully (queue 708 by default for FFTC_Inst_A).

If rxCfg.bBlockOnResult  bit is set to 0, i get this message:

Invalid result length, expected: 4112 received: 8576760
[Core 0]: Error parsing result, error: -6/

So I'am sending 1024 samples with one block to the FFTC, and it return me 8 mil values. This return value doesn't depend from the elapsed time (checked with for cycles up to 10k iteration). 

Checked everything twice and compare with example project, maybe someone has a hint where to look? 

I have a guessed that maybe I getting the wrong Rx queue, but in this case there will be a different error message and program will not get to the stage of retrieving FFT result.

Regards, Pavlo!

  

  • Is the original project (a delivered in the PDK package) working? What change(s) did you make to the original project?

  • Hi,

    The original project is working.  I made some changes to it and it pop's up the errors described above.

    As we discuss in the previous topics I'am trying to rewrite the code in the way without using Tasks.  So the changes I have made:

    1) Delete the Task creation strings and runing just like this test_fftc(CSL_FFTC_A);

        fftcInstNum = CSL_FFTC_A;

        Task_Params_init(&testTaskParams);

        testTaskParams.arg0 =   fftcInstNum;

        /* Create the FFTC test task */

        Task_create((Task_FuncPtr)&test_fftc, &testTaskParams, NULL);

    2) changed some fields in the rxCfg structure:

       rxCfg.cppiRxQNum                        =   662;

       rxCfg.bBlockOnResult                    =   0;

       rxCfg.bUseInterrupts                    =   0;

    3) These three left as they are, since I don't fully understand from the document how to pass from accumulation to Pend in the Rx config. (And without them it doesn't work. I understand it could be a mistake here.) As I understand all given config concern only the accumulation queue, and they works only with tasks. Is there any info about Rx configuration for Queue Pend queues?

       rxCfg.bManageAccumList                  =   1;      /* Let driver do the Accum Management */

    rxCfg.accumCfg.drvCfg.bEnablePacing    = 0; /* Disable pacing */

    rxCfg.accumCfg.drvCfg.intThreshold = 1; /* Set interrupt threshold to 1 */

    rxCfg.accumCfg.drvCfg.accChannelNum = 4;

    3. comment the Fftc_getDeviceAccumulatorConfig since I'am not using accum queue's.

    //    Fftc_getDeviceAccumulatorConfig (CSL_FFTC_A, &rxCfg.accumCfg.drvCfg.accChannelNum, &rxCfg.cppiRxQNum);

    4. Changed the register_rx_interrupts function to catch the pend signal

       Hwi_Params hwiParams;

       Error_Block eb;

       Hwi_Params_init(&hwiParams);

       Error_init(&eb);

       // set the argument you want passed to your ISR function

       hwiParams.arg = 1;

       // set the event id of the peripheral assigned to this interrupt

       hwiParams.eventId = 134;

       hwiParams.maskSetting = Hwi_MaskingOption_SELF;

       myHwi = Hwi_create(8, fftcIsr, &hwiParams, &eb);

       if (Error_check(&eb)) {

           // handle the error

       }

    void fftcIsr(UArg arg)
    {
    Fftc_osalLog ("FFTC result is ready %d\n", arg);
    }

    But this Hwi doesn't run, I don't get any error messages about it.

    The standard program with these changes run until this section and then wait forever if rxCfg.bBlockOnResult bit is set to 1.

     /* Submit the FFT request for processing */

    if (Fftc_txSubmitRequest (hTxObj,
    hRequestInfo,
    reqBufferLen) < 0)
    {
    Fftc_osalLog ("[Core %d]: Unable to submit request \n", coreNum);
    goto error;
    }
    else
    {
    #ifdef FFTC_TEST_DEBUG
    Fftc_osalLog ("Submitted request %d successfully \n", pktCounter);
    #endif
    }

    /* -------------------------------------
    * Wait on FFT result and verify Result
    * -------------------------------------
    */
    #ifdef FFTC_TEST_DEBUG
    Fftc_osalLog ("\n[Core %d]: Waiting for Result ... \n", coreNum);
    #endif

  • Before using QPend queues for RX, I would first use a general purpose queue and poll for output and get that working. Once you have that working you can then try using QPend queue.

    I would also recommend that you read the Navigator user guide and review the QMss and CPPI examples before using the Qpend queues.