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.

CC1352R: Combined code from the Sensor 2.4G example and the rfCarrierWave example resetting MCU

Part Number: CC1352R
Other Parts Discussed in Thread: TIMAC, , CC2630

I imported the sensor 2.4G example from simplelink_cc13x2_26x2_sdk_3_30_00_03\examples\rtos\CC1352R1_LAUNCHXL\ti154stack\sensor_2_4g into IAR 8.40.1 and it builds and runs ok sending/receiving messages I wanted.

I imported the RF CW example from simplelink_cc13x2_26x2_sdk_3_30_00_03\examples\rtos\CC1352R1_LAUNCHXL\drivers\rfCarrierWave and got it running with my IAR IDE and confirmed it was sending a CW at the frequency I wanted on my Launchpad board (2.4GHz).

Then I tried to combine the two projects by taking the simple code (like the RF_open call and the two RF_runCmd calls plus all the structure definitions like RF_cmdRadioSetup_ieee154_0) for CW generation and adding it into my TI 15.4 Stack-based sensor project and discovered that functions like RF_runCmd and RF_open either don't exist or are defined differently in the two projects, which causes my combined project to reset the MCU when calling RF_runCmd().

Digging deeper, I found that TI 15.4 Stack-based projects use a sort of a lookup table based off of a pointer called macRfDrvTblPtr, whose definition I couldn't find anywhere.  RF_runCmd and RF_open functions (or function-like macros?) need this pointer to get their ROM addresses.  Does anyone know where this pointer is defined?  I know it's declared as an extern in rf_mac_api.h, but the actual assignment must be hiding in some library somewhere.  I couldn't figure it out.

Bottom line is, if anyone knows how to add CW generation code to a TI 15.4 Stack-based project like Sensor 2.4G, this would help me a lot!

Thanks,

Michael

  • Just to clarify, when generating CW, I'd probably want to do this on a button press and I'll probably have to first disable the TI 15.4-Stack by calling RF_yield() and stop all the calls to functions that send and receive the 802.15.4 messages, which I've seen done with the TIMAC stack from 2015.  If anyone has examples of how to do this with the TI 15.4-Stack, I'd really appreciate it.

  • Hello Michael,

    Since 15.4 stack takes a hold of the radio underneath the MAC, it is not possible to do this. I recommend you look at our DMM examples in our SDK that allow you to put two stacks together and do this. we currently do not have any easylink + 15.4 but we do have ble + 15.4 and many other ones that might be very useful to your application.

  • Hi AB,

    What if I called RF_yield() to stop TI_15.4-Stack and added the file RFCC26X2_multiMode.c included in the CC1352R SDK to my project, and then used RF_open() and RF_runCmd() from that file?

    Thanks,

    Michael

  • I've looked into EasyLink, BLE, 15.4 and DMM.  It looks like TI doesn't recommend creating my own RF stack combinations and doesn't have any guides on how to do it.

    Also, EasyLink doesn't have the functionality I'm looking for.  The EasyLink_setCtrl() function that initiates the Tone command that I need has a busy waiting loop in it that would prevent me from sending a tone for less than 10ms.

    I think the most viable option for me is NOT to use DMM and just find a way to disable the 15.4 stack and use RF_open() and RF_runCmd() functions or their equivalents (from the proprietary RF stack?) to send a CW signal.

    Any help with this would be greatly appreciated.

    Thanks,

    Michael

  • Hello Michael,

    RF yield might work. I have not tried this.

    Another option could be to also go ahead and stop the network altogether and do your separate RF transmission, and then restart the network.

    Regards,

    AB

  • Hi AB,

    Could you clarify what you mean by "stop the network altogether"?  Are you referring to the Rf_yield() function call or something else?

    Also, do you know why I was unable to send a CW tone prior to bringing up the TI 15.4-Stack?  It looks like the right RF library is not linked into my project, and I was unable to identify which library I need to use to call RF_open() and RF_runCmd().

    Thanks,

    Michael

  • Also, if I want to try using the RF_yield() call, do I need to create a new RF driver handle with an RF_open() call or should I try to re-use the existing RF driver handle from the 15.4-Stack?  If the answer is the latter, then how do I obtain the 15.4-Stack driver handle?

  • Michael,

    RF_Yield() will make the rf core go to sleep, that is the purpose of this API. It will not stop operations from the 15.4 Stack and will cause problems when 15.4 MAC tries to do other operations with the Radio.

    That being said, you said you were able to get this done with TIMAC? The underlying MAC is basically TIMAC, have you tried doing what you did with TIMAC before?

    Can you further explain why you need CW, what is purpose of it and I could help you find a way to get this done?

    The reason why I offered DMM was because it offers a middleware that schedules the RF calls. You could potentially do something similar also(I do not recommend this route as it will be a lot of dev work) by having a lighter weight DMM ish type application that could manage the RF calls in a way that you can control what the radio is used for.

    Regards,

    AB

  • Hi AB,

    I was previously using TIMAC released in 2015 in my CC2630-based project.  We were using 802.15.4 at 2.4GHz for data communication and a CW tone at 2.4GHz as a "locator" signal to locate the radio for our proprietary technology.  This signal needs to last about 500us, which we were able to do with the CC2630 MCU.  We were also able to suspend TIMAC with a "Yield" command, send a CW tone signal, then resume the TIMAC stack with the "Resume" command.  It seemed to work ok, although not very reliably.  The API function we used to send a CW tone was MB_SendCommand().

    We're now transitioning to CC1352R with the new software stack based on the "15.4-Stack", which, as I understand it, contains TIMAC 2.0 as an underlying layer.  I'm not sure what happened to the MB_SendCommand() function, but it seems to no longer be available.

    I'm currently trying to do the following:

    MAC_YieldReq();
    
    /* Request access to the radio */
    rfHandle = RF_open(&rfObject, &RF_prop_ieee154_0, (RF_RadioSetup*)&RF_cmdRadioSetup_ieee154_0, &rfParams);
    
    /* Send CMD_FS and wait until it has completed */
    RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs_ieee154_0, RF_PriorityNormal, NULL, 0);
    
    /* Send CMD_TX_TEST which sends forever */
    RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest_ieee154_0, RF_PriorityNormal, NULL, 0);

    To get RF_open()/RF_runCmd() functions to work, ended up borrowing the file C:\ti\simplelink_cc13x2_26x2_sdk_3_30_00_03\source\ti\drivers\rf\RFCC26X2_multiMode.c from the SDK and linking it to my project.

    I also borrowed the structures like RF_cmdRadioSetup_ieee154_0 from the rfCarrierWave SDK example after I modified it to run at 2.4GHz.

    And this seems to work OK to start the CW tone.  I'm not sure if I'll be able to stop it and resume the 15.4-Stack properly.  I need some help understanding what the 15.4-Stack does after the Yield call, how I can prevent clashing with it when running RF_open()/RF_runCmd() functions, and how to resume it properly after I'm finished with the last RF_runCmd() call.

    Thank you so much for your help!

    Michael