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.

AM620-Q1:How to set MCASP_Transaction.count

Part Number: AM620-Q1

Tool/software:

What are the settings for MCASP_Transaction.count?
I set the size of the output buffer for a transaction, but McASP outputs data that exceeds the range of the output buffer.
I set the buffer size in bytes referring to the comments in mcasp.h. Is this incorrect?
I checked the mcasp_playback code in Example for reference and found that the buffer size is set by dividing by 4.
Why divide by 4?

Thank you.

  • Hi Naomichi-san,

    Apologies for the delayed response. MCASP_Transaction::count signifies the number of slots sent in a transaction.
    If you check the sysConfig->Mcasp->transmit configurations, you can see that the slot size is set to 32. 
    In the mcasp_playback.c file, you can see the definition of the transmit and receive buffers -> uint8_t gMcaspAudioBufferTx[APP_MCASP_AUDIO_BUFF_COUNT][APP_MCASP_AUDIO_BUFF_SIZE] , the buffers are uint8_t. So 4 elements in the buffer actually make up one slot. To get the number of slots, we divide the APP_MCASP_MSGSIZE by 4. 

    The definition in the document is not correct. We will fix it in the documentation. The "count" attribute does not signify the number of bytes in the transaction, but the number of slots sent in the transaction.

    Regards,
    Ritapravo