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.

LP-CC1352P7: Two-way streaming method using OPUS codec.

Part Number: LP-CC1352P7
Other Parts Discussed in Thread: CC1352P7

Tool/software:

hi experts,

my customer have been migrated opus codec example to CC1352P7 due to lack of memory in CC1352P1.

they confirmed that the one-way communication works well. however, when the two-way service is started, the system stops.

so, Tx thread and Rx thread are configured as independent, the system stops as the same.

Please advise me on this matter.
If you need it, I will send you the project source file by separate e-mail.

mainThread()

{

SYS.MicRunning = true; //JHL-20250203 , TX를 위한 설정

Board_initGeneral();    AudioHAL_init();    Packetizer_init();

//Setup OPUS Parameters

eventHandle = Event_create(NULL, NULL);

RF_Params rfParams;    RF_Params_init(&rfParams);

RFQueue_defineQueue(…);

RF_cmdPropTx.xxxx 설정

RF_cmdPropRx.xxxx 설정

rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);

AudioHAL_Params_init()

tlv320Handle = AudioHAL_open()

packetizerHdl = Packetizer_open()

AudioHAL_startStream(tlv320Handle, AUDIOHAL_INPUT_OUTPUT);

RF_postCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal,

     &rxDoneCB, RF_EventRxEntryDone);

While(1)

{

     Events= Event_pend();

     if(SYS.MicRunning)

     {

          If(event_TX_AUDIO)

          {

               AudioHAL_readBufGet(tlv320Handle, (void *)audioIn);

               RF_scheduleCmd(rfHandle, (RF_Op*)&RF_cmdPropTx,…)

               GPIO_toggle(RED_LED);

          }

    }

    GPIO_toggle(GREEN_LED);

    if(event_RX_AUDIO)

    {

       …

    }

}

}

thanks 

BR,

  • Hi

    We do not have resources to debug your code at the moments, so we will need you to just provide us more info so that we can understand more of the probem.

    Please provide me with the following info

    What SDK version is the customer using?

    What code example (exact name of example and revision of SW) are they using?

    What exact changes are made from the default example (and working solution) to the solution that is not working?

    Please provide info on what you mean when you say that the system stops?

    Are the code stuck in some while loop for error handling, is it the radio that is not sending/receiving?

    Siri

  • Hi Siri

    They are using SDK as simplelink_cc13xx_cc26xx_sdk_7_41_00_17.

    Audio examples using the OPUS codec are only available on CC1352P1 in simplelink_audio_plugin_3_30_00_06.

    Therefore, they are merging audiohal_packetizer_echo examples into i2secho examples of CC1352P7.

    audiohal_packetizer_echo is using LED operation to confirm bidirectional communication. Likewise, we are checking RX with LED operation after TX for bidirectional communication confirmation.

    If RX is received during Tx operation, LED will not work and RX data will not be verified.

    Please point out the error or guide me.



    Thank you.

  • I am really sorry but It is not easy to tell you from the info I have what is wrong.

    If I understand correctly, the customer has made their own example, where they use the audio plugin +  the i2secho as references and try to merge them somehow.

    Since non of the example you say they have use are using the radio, what have the used as a reference for their radio implementation?

    I do not understand your statement “If RX is received during Tx operation”

    It is not possible to receive and transmit at the same time, so what is the customer actually trying to do?

    If the problems are related to the RF communication, I would recommend that they start by getting the RF protocol up and running just sending dummy packets, and when that work OK, they can add the audio part.

    To debug this, the best way is to toggle debug signals when calling the different RF commands, toggle debug signals in the callbacks etc, to figure out what exactly stops working (using a logic analyser)

    It can also be useful to output the LNA and PA signals to two pins, to be able to monitor when the radio is in RX and TX.

    Routing RF Core Signals to Physical Pins — SimpleLinkTm CC13XX/CC26XX SDK Proprietary RF User's Guide 7.30.00 documentation

    Reading the status of the RF commands will also give you useful info as to what goes wrong (RF_cmdPropRx.status/RF_cmdPropTx.status)

    Siri

  • My name is JH LEE copertate with Robin Moon.

    -  Purpose: To send voice data and receive voice, as phone
    -  Test:

      1)  Voice function excluded
      2)  Separate LP_CC1352P7 into send/receive thread based on example rfPacketTx
      3) TxThread : Tx packet data (50bytes/20msec)
           RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
      4) RxThread :
          terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &callback, RF_EventRxEntryDone);

    - Issue: If there is no event in RxThread for a certain period of time, I want it to be returned .

  • If you want to stop RX, you can 

    use RF_postCmd (non-blocking) instead of RF_runCmd (blocking)m and the use RF_cancelCmd when you want to exit (see rflib: RFCC26X2.h File Reference)

    or

    use the end triggers of the command to end RX at a spesific time (see the rfWakeOnRadioRx example onhow this can be done.

    Siri

  • If RF_postCmd() is performed on RxThread, no TX_DONE event occurs on TxThread in single board.
    How does RF_scheduleCmd on TxThread correlate with RF_postCmd() on RxThread?JCORE_Issue_#4-1.pptx

  • I am afraid I do not understand what you are doing in your code, and I do not know how to help you when you are not following my advice.

    First of all, remove everything that has to do whit audio until you have the RF up and running.

    Use the debug signals I recommended to figure out what task is running when, what callbacks you get, and what state the radio is in (I cannot tell you what if failing based on the code snippets you are sharing).

    Have you even verified that the two different threads you have are running when they are expected to?

    You are opening the RF Driver twize (both in the RxThread and in the TxThread). Where are you closing it? You cannot open the driver twize like this

    Siri