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.

TMS320C6657: McBSP send one additionnal word

Part Number: TMS320C6657
Other Parts Discussed in Thread: TMS320F28377D

Hi.

I try to send N words through McBSP in DMA mode to a DELFINO processor. 

When N words have been received on DELFINO, an interruption is called. Then, software copies McbSP's internal buffer into an external buffer. These buffers are equal.
But when DELFINO initialize again a RX transfer, one word is copied into the internal buffer whereas C66 TX transfer is not started.

For example with N = 3

C66 TX buffer                                                         1 | 2 | 3

DELFINO RX buffer when interruption is called      1 | 2 | 3

DELFINO RX buffer after RX initialization               x | 2 | 3

The data 'x' is a random data (for information, it is not the data at buffer address + (N + 1));

It seems that C66 send one word in addition.

Do you have any idea?

  • Hi,

    I've notified the C66x team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi Fab

    I see that you also posted on TMS320F28377D: McBSP through DMA in oneshot mode . Did mark answer your questions?

    David
  • Hi David.

    Sorry for the delay of the answer and thank you to take time with my problem.

    Unfortunately, I have already read these examples.

    I try an another test with the same configuration.

    I send a buffer of 5 words of 16 bits and I would like to receive 64 words of 16 bits.

    For the test, I watch the internal buffer address of the McBSP driver allocated by the Osal_mcbspDataBufferMalloc() function.

    Transfer 1:

    TX: 1111 2222 3333 4444 5555

    RX: 1111 2222 3333 4444 5555 5554

    Is it the end of RX frame? No. So

    Transfer 2:

    TX: 1111 2222 3333 4444 5555 ...

    RX: 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 5555 5554

    Is it the end of RX frame? No. So

    Transfer 3:

    TX: 1111 2222 3333 4444 5555 ...

    RX: 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 5555 5554

    If I try to send 4 words of 16 bits

    Transfer 4:

    TX: 1111 2222 3333 4444

    RX: 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 5555 5554 1111 2222 3333 4444 4444

    So in each transfer, one word is sent in addtition. Any idea?

    Here, this is my code when I send data:

    [...]

    pIoBuf->cmd = Mcbsp_IOBuf_Cmd_WRITE;
    pIoBuf->addr = (void *)getGlobalAddr(bufferTx);
    pIoBuf->size = framSizeInByte;
    pIoBuf->arg = (uint32_t)pChannelTxObj;
    pIoBuf->status = MCBSP_STATUS_COMPLETED;
    pIoBuf->misc = 1;

    status = mcbspSubmitChan(pChannelTxObj, pIoBuf);

    [...]

    Here this is Mcbsp_ChanParams configuration for TX :

    .wordWidth = Mcbsp_WordLength_16

    , .gblCbk = NUL

    , .edmaHandle = NULL

    , .edmaEventQue = 1

    , .hwiNumber = 8

    , .dataFormat = Mcbsp_BufferFormat_1SLOT

    , .enableHwFifo = true

    , .chanConfig = &(Mcbsp_DataConfig) {

    .phaseNum = Mcbsp_Phase_SINGLE 

    , .wrdLen1 = Mcbsp_WordLength_16

    , .frmLen1 = 1

    , .frmSyncIgn = Mcbsp_FrmSync_DETECT

    , .dataDelay = Mcbsp_DataDelay_0_BIT

    , .intMode = Mcbsp_IntMode_ON_SYNCERR

    }

    , .clkSetup = &(Mcbsp_ClkSetup) {

    .frmSyncMode = Mcbsp_FsClkMode_INTERNAL

    , .samplingRate = 1562500

    , .clkMode = Mcbsp_TxRxClkMode_INTERNAL

    , .frmSyncPolarity = Mcbsp_FsPol_ACTIVE_LOW

    , .clkPolarity = Mcbsp_ClkPol_RISING_EDGE

    }
    Here this is Mcbsp_ChanParams configuration for RX :

    .wordWidth = Mcbsp_WordLength_16

    , .gblCbk = NUL

    , .edmaHandle = NULL

    , .edmaEventQue = 1

    , .hwiNumber = 8

    , .dataFormat = Mcbsp_BufferFormat_1SLOT

    , .enableHwFifo = true

    , .chanConfig = &(Mcbsp_DataConfig) {

    .phaseNum = Mcbsp_Phase_SINGLE 

    , .wrdLen1 = Mcbsp_WordLength_16

    , .frmLen1 = 1

    , .frmSyncIgn = Mcbsp_FrmSync_DETECT

    , .dataDelay = Mcbsp_DataDelay_0_BIT

    , .intMode = Mcbsp_IntMode_ON_SYNCERR

    }

    , .clkSetup = &(Mcbsp_ClkSetup) {

    .frmSyncMode = Mcbsp_FsClkMode_EXTERNAL

    , .samplingRate = 1562500

    , .clkMode = Mcbsp_TxRxClkMode_EXTERNAL

    , .frmSyncPolarity = Mcbsp_FsPol_ACTIVE_LOW

    , .clkPolarity = Mcbsp_ClkPol_FALLING_EDGE

    }