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.

[FAQ] What is Active Slot bitmask, Data Bitmask, and Transaction Count in MCASP?

Part Number: AUDIO-AM62D-EVMAUDIO-AM275-EVM
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

1. While configuring McASP through sysConfig, I found that when the num of slots set as 2, the active slot bitmask can only below 3. What is this active slot bitmask and why it can take values only within 0 and 3?

2. In sysConfig -> McASP, what does Data Bitmask signify?

3. Why is the count passed in the MCASP Transfer example divided by 4?


  • In McASP, a frame is a collection of one or multiple slots that are sent together during one frame sync signal.  

    1. While configuring McASP through sysConfig, I found that when the num of slots set as 2, the active slot bitmask can only below 3. What is this active slot bitmask and why it can take values only within 0 and 3?

    If you have selected the slot size as 2, it basically means that the frame can transmit 2 slot data can be sent in 1 frame. Each slot can be configured to be either an active or inactive. Since there are 2 sots here, the values can be either 2b00, 2b01, 2b10 0r 2b11. 

    00 -> both slots are inactive
    01/10 -> one active slot
    11 -> both slots are active

    2. In sysConfig -> McASP, what does Data Bitmask signify?

    Here, the Transmit slot size is set as 32. So, 32 bits will be set out in 1 slot. 0xFFFFFFFF (32 1's ) signifies that all the 32 bits together make up the audio data of 1 slot. 0xFFFFFFF0 would have signified that that first 28 bits are only part of the audio data are the rest are padding.

    3. Why is the count passed in the MCASP Transfer example divided by 4?

    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 declared 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.