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.

6657 mcbsp example problems

I use the example examle that calling the fuction(mcbspDigLpbkApp()) alonly.But it can't ran to status = mcbspSubmitChan(hMcbspRxChan, (void *)&rxFrame).

Void main(Void)
{
Task_Params taskParams;
EDMA3_DRV_Result edmaResult = 0;
int j=0;
uint8_t uchValue;

/* Get the core number. */
coreNum = CSL_chipReadReg (CSL_CHIP_DNUM);
/* MCBSP Driver Initialization: This should always be called before
* invoking the MCBSP Driver. */
mcbspInit();
/* Device Specific MCBSP Initializations */
McbspDevice_init();
/* Initialize EDMA3 library */
hEdma[0] = edma3init(0, &edmaResult);

Gpio_init();
Fpga_reset();

mcbspDigLpbkApp();


/* Create the Digital Loopback Application Task */
Task_Params_init(&taskParams);
Task_create(decodetask, &taskParams, NULL);

/* Start BIOS */
BIOS_start();

return;
}

But it work right and can ran to status = mcbspSubmitChan(hMcbspRxChan, (void *)&rxFrame) when I use the original way .Does this example must use a task to send mcbsp datas???

Void main(Void)
{
Task_Params taskParams;
EDMA3_DRV_Result edmaResult = 0;
int j=0;
uint8_t uchValue;

/* Get the core number. */
coreNum = CSL_chipReadReg (CSL_CHIP_DNUM);

/* MCBSP Driver Initialization: This should always be called before
* invoking the MCBSP Driver. */
mcbspInit();
/* Device Specific MCBSP Initializations */
McbspDevice_init();
/* Initialize EDMA3 library */
hEdma[0] = edma3init(0, &edmaResult);

Gpio_init();
Fpga_reset();
/* Create the Digital Loopback Application Task */
Task_Params_init(&taskParams);
Task_create(mcbspDigLpbkApp, &taskParams, NULL);

/* Start BIOS */
BIOS_start();

return;
}

  • Hi,

    Basically, in BIOS projects, it would use tasks/threads for GIO calls and the tasks needs tobe scheduled in the BIOS kernel to execute the desired functionality. Likewise, in the mcbspDigLpbkApp() example function, it uses bios task/thread to send or receive mcbsp data. Yes, you are right that, it must use task to send mcbsp data and to execute mcbsp functionality to the desired application.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • I can send datas(32bits,a word per frame) to fpga now. but when I let BUFSIZE=16 and bufTx[count] = (uint32_t *)Osal_mcbspDataBufferMalloc(BUFSIZE), there will be 4 frames. And I found that it can't send 9 datas. It must be 4*n datas.

    problem 1:what's the relationship with BUFSIZE and frame/data number?

    problem 2:This example is using mcbsp0. When I want to use mcbsp1, how can I do?I didn't find where to config the addresses of registers(DXR1,PCR1,XCR1,SRGR1,...).
  • Hi,

    Thanks for your update.

    I think, you would require pinmux and power module (PSC) configuration changes to adapt the code to work for mcbsp1 but before that, kindly ensure the c6657 EVM board schematic to check for the feasibilty of hard-wired line availability of mcbsp1 port on c6657 device for re-use the same code.

    In debug mode, please keep breakpoints on the below two functions in the code inorder to find out to configure the addresses of mcbsp registers (DXR1,PCR1,XCR1,SRGR1,...)

    /* MCBSP Driver Initialization: This should always be called before invoking the MCBSP Driver. */

    mcbspInit();

    /* Device Specific MCBSP Initializations */

    McbspDevice_init();

    The above would be the right place to spot out the mcbsp registers to configure the desired functionalities for the same. Also, check the task "mcbspDigLpbkApp" in the code to check for the configuration of mcbsp registers (DXR1,PCR1,XCR1,SRGR1,...) through breakpoints at respective places in debug mode.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------