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.

mcbsp1 sio_reclaim hangs forever

Other Parts Discussed in Thread: OMAPL138

Hello

      I'm using mcbsp1 of omapl138 on  a custom board. I wanna do a data loopback using edma3 on the same board. I've changed the mcbspSampleMaster project shipped with the pspiom driver package and created two streams succesfully and the buffers are allocated successfully. But reclaiming those buffers hangs forever. I'm using the following mcbspchanparams for the two streams. What could be the reason for the reclaim waits for the buffer forever. why it couldn get the buffer that has been issued.

/**< settings to configure the TX or RX hardware sections                 */
Mcbsp_DataConfig mcbspChanConfig =
{
    Mcbsp_Phase_SINGLE,
    Mcbsp_WordLength_8,
    Mcbsp_WordLength_8,    /* Dont care for single phase*/
    NUM_OF_CHANNELS,
    NUM_OF_CHANNELS,       /* Dont care for single phase*/
    Mcbsp_FrmSync_DETECT,
    Mcbsp_DataDelay_1_BIT,
    Mcbsp_Compand_OFF_MSB_FIRST,
    Mcbsp_BitReversal_DISABLE,
    Mcbsp_IntMode_ON_READY,
    Mcbsp_RxJust_RZF,  /* Dont care for TX         */
    Mcbsp_DxEna_ON
};

/**< clock setup for the TX section                     */
Mcbsp_ClkSetup mcbspTxClkConfig =
{
    Mcbsp_FsClkMode_DXR_XSR,
    96000,                   /* 96KHz                   */
    Mcbsp_TxRxClkMode_EXTERNAL,
    Mcbsp_FsPol_ACTIVE_HIGH,
    Mcbsp_ClkPol_RISING_EDGE
};

Mcbsp_ClkSetup mcbspRxClkConfig =
{
    Mcbsp_FsClkMode_EXTERNAL,
    96000,                   /* 96KHz                   */
    Mcbsp_TxRxClkMode_EXTERNAL,
    Mcbsp_FsPol_ACTIVE_HIGH,
    Mcbsp_ClkPol_RISING_EDGE
};

/**< Multi channel setup                                                      */
Mcbsp_McrSetup mcbspMultiChanCtrl =
{
    Mcbsp_McmMode_ALL_CHAN_ENABLED_UNMASKED,
    Mcbsp_PartitionMode_CHAN_0_15,
    Mcbsp_PartitionMode_CHAN_16_31,
    Mcbsp_PartitionMode_2
};

Mcbsp_ChanParams mcbspTxChanparam =
{
    Mcbsp_WordLength_8,   /* wordlength configured    */
    NULL,                 /* loop job buffer internal */
    0,                    /* user loopjob length      */
    NULL,                 /* global error callback    */
    NULL,                 /* edma Handle              */
    0,                    /* EDMA event queue         */
    8,                    /* hwi number               */
    Mcbsp_BufferFormat_1SLOT,
    TRUE,                 /* FIFO mode enabled        */
    &mcbspChanConfig,     /* channel configuration    */
    &mcbspTxClkConfig,      /* clock configuration      */
    &mcbspMultiChanCtrl,  /* multi channel control    */
    0x00,
    0x00,
    0x00,
    0x00
};

Mcbsp_ChanParams mcbspRxChanparam =
{
    Mcbsp_WordLength_8,   /* wordlength configured    */
    NULL,                 /* loop job buffer internal */
    0,                    /* user loopjob length      */
    NULL,                 /* global error callback    */
    NULL,                 /* edma Handle              */
    1,                      /* EDMA event queue         */
    9,                    /* hwi number               */
    Mcbsp_BufferFormat_1SLOT,
    TRUE,                 /* FIFO mode enabled        */
    &mcbspChanConfig,     /* channel configuration    */
    &mcbspRxClkConfig,      /* clock configuration      */
    &mcbspMultiChanCtrl,  /* multi channel control    */
    0x00,
    0x00,
    0x00,
    0x00
};

 

kindly help,

Thanks and Regards,

BABUSUBASHCHANDAR

  • I'm not up to speed on the McBSP driver but the problem is probably due to either no data and/or no ISR.   SIO_reclaim() will block (calls SEM_pend() internally) waiting for a data buffer to be filled/emptied.   An ISR is triggered whenever a buffer is filled/emtpied.  This ISR calls SEM_post().   I would check your setup against one of the samples and see if you are missing some interrupt setup.  Have you tried to run one of the sample apps on your board?

    We had a recent problem with someone trying to use 2 McBSP channels.  Maybe something on this post relates to your issue?

    http://e2e.ti.com/support/embedded/f/355/p/83925/304107.aspx?PageIndex=2

    -Karl-