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: How to add an antenna switch from SysConfig?

Part Number: CC1352R
Other Parts Discussed in Thread: SYSCONFIG

Hi Expert,

Setup:

SDK:                 simplelink_cc13x2_26x2_sdk_5_10_00_48
Devices:           custom CC1352R

We are thinking of designing a custom CC1352R board with an antenna switch.

Apparently SysConfig generates the appropriate RFCC26XX_hwAttrs variable with the required globalCallback only if the <board> defined in the *.syscfg header (--board) contains a RF component:

dmm_wsnnode_ble_sp.syscfg

/* ======== RF ======== */
var RF = scripting.addModule("/ti/drivers/RF");

/* if an antenna component exists, assign it to the rf instance */
if (system.deviceData.board && system.deviceData.board.components.RF) {
    RF.$hardware = system.deviceData.board.components.RF;
}

So I patched the SDK in order to create a custom LAUNCHXL_CC1352R_myboard exposing an antenna switch.

I also need to modify one *.js file in order to fix an issue while loading my *syscfg. 

It works but now I am wondering how could I get the same result without modifying the SDK?

For instance, does SysConfig support overlays specifying only the difference from a T.I Hardware Reference?

  • If yes, please help
  • If no, how to add an antenna switch (or any other component/module) with SysConfig? (By the way, this user guide does not help at all)

Thanks

  • It could be that you can do something like this by changing the syscfg files but it would probably be easier to copy the rfDriverCallbackAntennaSwitching function from one of the examples in the SDK (import the example, compile and search for function in the ti_drivers_config.c. Don't copy the __attribute__((weak)) )and place it in the application code with the changes required to control the switch you are using.

  • Hi TER,

    Thanks for your quick reply,

    /*
     * Platform-specific driver configuration
     */
    const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = {
        .hwiPriority        = (~0),
        .swiPriority        = (uint8_t)0,
        .xoscHfAlwaysNeeded = true,
        .globalCallback     = &RF_globalCallbackFunction,
        .globalEventMask    = RF_GlobalEventInit | RF_GlobalEventRadioPowerDown | RF_GlobalEventRadioSetup
    };
    

    1. SysConfig generates a RFCC26XX_hwAttrs with a .globalCallback function only if the <board> exposes an RF module.
    2. This RF module is defined in the SDK within the board definition file (<board>.syscfg.json).

    My question is:

    • Should I manually create a custom board (custom.syscfg.json) by patching the SDK (like I did)?
    • or Is there a way to add this RF module (antenna switch) from SysConfig UI (without modifying the SDK)?

    Thanks,

  • Just to take one step back to understand your setup: 

    Are you starting the development from one of our examples or are you starting on scratch? The former would be easier than the latter. 

  • Hi TER,

    Let's consider a custom board based on the LPSTK-CC1352R design but with one antenna switch (like the LAUNCHXL-CC1352P).

    How to specify this antenna switch from SysConfig using any *-CC1352R example, in order to generate the appropriate RFCC26XX_hwAttrs?

  • If you want to do this with syscfg: 

    It should not be required to alter the SDK. I haven't looked into this in detail (and unfortunately I can't take the time today for a more deep-dive) so please bear with me.  

    It could be that this <SDK install path>/docs/proprietary-rf/proprietary-rf-users-guide/sysconfig/proprietary-rf-migration.html#sysconfig-migration-tool is more useful. 

    You can generate a .syscfg file that uses the drivers etc you need based on an example and copy this into your project. Then make a board file based on one of the existing board files (I assume you have done this part). It should be possible to place this file outside the SDK but that is one of the things I would have to test. Which *.js did you change? 

  • Hi TER,

    Actually, I did not even notice the RF tab in Sysconfig exposing the "No. of Antenna Switch Control Pins".

    By defining a positive pin number, I can specify their corresponding DIO# and generate the appropriate Radio switch callback.

    Thanks a lot