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.

CC8531: How to achieve data communication between the CC8531(or MCU) and the Host, similar to Multi HID mode?

Part Number: CC8531

Hi 

In this regard i have one question:

I am using slave in host controlled mode and achieved auto pairing with master device that means with out any button press.

Now my issue is i am unable to hear any audio from master to slave. 

If i don't use host control option in configurator then i could hear.

Please let me know if anything can be done in host control mode to get audio .

Regards,

Sivaram

  • Hi Sivaram,

    Can you share your HW configuration? I assume you have carefully studied the CC85xx User´s Guide, right?

    Cheers,
    Fredrik
  • Hi Fredrik,

    I am using MSP430 as Host controller and followed CC8531 Dicument for SPI connections from MSP430 and CC8531.

    From Host i am able to control the CC8531(auto pairing achieved) but my only issue is i am unable to hear any thing from Master. I generated slave image by choosing host control mode and flashed on to Slave (cc8531) and try to use the example Slave Debug distributed by TI , Here i am able to auto pair by writing the DeviceID into non volatile storage and i am seeing pairing happens with master board  after that i tested audio by feeding MIC of master and try to listen at Head phone port of Slave but  no audio.

    I am using following command to write Device ID and auto pair.

      ehifCmdExec(EHIF_CMD_NVS_SET_DATA, sizeof(EHIF_CMD_NVS_SET_DATA_PARAM_T), &ehifCmdParam);

      ehifCmdExec(EHIF_CMD_NWM_DO_JOIN, sizeof(EHIF_CMD_NWM_DO_JOIN_PARAM_T), &ehifCmdParam);

    Regards,

    Sivaram

  • Hi Sivaram,

    I assume you slave is also host controlled? Have you verified that your codec is being properly configured by the host processor?

    Cheers,
    Fredrik
  • Hi Fredrik,

    Slave is only in Host controlled mode, Master i am operating in autonomous mode.

    From Host i am configuring Slave codec like this after auto pairing achieved with master  :

    memset(&ehifCmdParam, 0xFF, sizeof(EHIF_CMD_NWM_ACH_SET_USAGE_PARAM_T));
    ehifCmdParam.nwmAchSetUsage.pAchUsage[0] = 0; // Front left -> I2S LEFT
    ehifCmdParam.nwmAchSetUsage.pAchUsage[1] = 1; // Front right -> I2S RIGHT
    ehifCmdExec(EHIF_CMD_NWM_ACH_SET_USAGE, sizeof(EHIF_CMD_NWM_ACH_SET_USAGE_PARAM_T), &ehifCmdParam);

    Please do let me know do i need to configure(Slave Codec) anything else from Host .

    Regards,

    Sivaram

     

  • Hi Sivaram,

    Can you please send the full list of EHIF commands you use to initiate the link and start audio streaming?

    Cheers,
    Fredrik
  • Hi Fredrik,

    Please find all the details :

    My requirement is group of people conversation , but this solution supports 1 master and maximum 4 slaves in Broadcast mode. So my idea is any slave can become master by switch control (by flashing master image) and all other slaves should automatically pair to new master and listen.

    To achieve above functionality , in host processors i hard coded the device IDs of all devices and try to connect one after other like:

    pseudo code :

    while()  

    {

    connect to Dev1 

         if not successful

    connect to Dev2 

         if not successful

     connect to Dev3

    .....

      }    

    To initially start with i used two masters and one slave like at a time one master will be ON and slave should auto pair, I could achieve this auto pair but audio not coming. 

    Master i used as stand alone in autonomous mode and slave in host control mode.

    Here are the list of commands i used, 

    if (!(ehifGetStatus() & BV_EHIF_STAT_CONNECTED))
    {
    nwkId = 0x2001C198;

    // Place the new network ID in CC85XX non-volatile storage

    initParam();
    ehifCmdParam.nvsSetData.index = 0;
    ehifCmdParam.nvsSetData.data = 0x2001C198;
    ehifCmdExec(EHIF_CMD_NVS_SET_DATA, sizeof(EHIF_CMD_NVS_SET_DATA_PARAM_T), &ehifCmdParam);
    cnt =0;
    while(1)
    {
    cnt ++;
    status_master = ehifGetStatus();

    if (!(status_master & BV_EHIF_STAT_CONNECTED))
    {
    initParam();
    ehifCmdParam.ehcEvtClr.clearedEvents = BV_EHIF_EVT_NWK_CHG;
    ehifCmdExec(EHIF_CMD_EHC_EVT_CLR, sizeof(EHIF_CMD_EHC_EVT_CLR_PARAM_T), &ehifCmdParam);
    initParam();
    ehifCmdParam.ehcEvtMask.irqGioLevel = 0;
    ehifCmdParam.ehcEvtMask.eventFilter = BV_EHIF_EVT_NWK_CHG;
    ehifCmdExec(EHIF_CMD_EHC_EVT_MASK, sizeof(EHIF_CMD_EHC_EVT_MASK_PARAM_T), &ehifCmdParam);

    // Not connected: Start JOIN operation
    initParam();
    ehifCmdParam.nwmDoJoin.joinTo = 100;
    ehifCmdParam.nwmDoJoin.deviceId = nwkId;
    ehifCmdExec(EHIF_CMD_NWM_DO_JOIN, sizeof(EHIF_CMD_NWM_DO_JOIN_PARAM_T), &ehifCmdParam);
    }
    else  //once connection happens configure audio.
    {
    memset(&ehifCmdParam, 0xFF, sizeof(EHIF_CMD_NWM_ACH_SET_USAGE_PARAM_T));
    ehifCmdParam.nwmAchSetUsage.pAchUsage[0] = 0; // Front left -> I2S LEFT
    ehifCmdParam.nwmAchSetUsage.pAchUsage[1] = 1; // Front right -> I2S RIGHT
    ehifCmdExec(EHIF_CMD_NWM_ACH_SET_USAGE, sizeof(EHIF_CMD_NWM_ACH_SET_USAGE_PARAM_T), &ehifCmdParam);
    break;

    }


    These are EHIF commands i am using, Please let me know whether i need to use any other commands to configure audio.

    Master : I am using autonomous mode configuration in tool and flashing the image, no host here.

    Slave : Using Host MSP430, slave image is generated using Host control option in configurator.

    Note :  If i generate Slave image using autonomous mode in tool then audio is coming but auto pairing is not happening , reason might be it is not allowing to write Device ID in NVRAM.            

    Regards,

    Sivaram

  • Hi Sivaram,

    Try the following:
    - Run VC_SET_VOLUME
    - Run NWM_GET_STATUS_S, and examine the output
    - Run ehifGetStatus() before and after each EHIF operation, and examine the output

    Cheers,
    Fredrik
  • Hi,

    I tried VC_SET_VOLUME , though not resolved.

    But finally i could achieve this .

    Thanks for your replies.

    Regards,
    Sivaram
  • Hi Sivaram,

    So now it is working? What did you do to fix it?

    Regards,
    Fredrik
  • Hi Fredrik,

    Yes its working, Reason is connect command i am sending continuously and instead i sent once and waited.

    Regards,

    Sivaram