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.

CCS/CC1352P: CC1352P Custom Board generation in Syscfg

Part Number: CC1352P
Other Parts Discussed in Thread: SYSCONFIG

Tool/software: Code Composer Studio

Hi All,

We are working on CC1352P Rev E based silicon product.

We uploaded a sample project from ble5stack. Here in the default SysCfg board file for IO configuration it is not allowing to re assign. For ex: BTN1 is locked to IOID_15, if I want to use IOID_15 for other purpose then I have to select "Use Hardware"

To overcome this I created the Custom Board in the SysCfg UI. But now it is showing an error as below (rfDriverCallbackCustom)

Kindly help me in fixing this.

Thanks & Regards,

Yasar Arafath

  • Hi Yasar,

    Which exact changed did you do? It looks to me like you need to go into the "RF" module of SysConfig and re-configure the callback function name to the old one (assuming that what ever changed you did added "Custom" to the end of the old name).

  • Hi M-W,

    We tried in SimplePeripheral and Multirole examples.

    In Multirole after defining the callback function in the application it is working fine.

    Same if we do in the SimplePeripheral it is advertising 2 to 3 seconds and stopping.

    If we put a breakpoint inside application main loop in "SimplePeripheral_taskFxn" it is not hitting there.

    Thanks & Regards,

    Yasar Arafath

  • Hi Yasar,

    It is still not clear what changes you did in the SysConfig? For the "P" devices this callback is already defined in the application (and should be named "rfDriverCallback" if I remember correctly). It sounds to me that what ever happened in your SysConfig file ended up changing the expected name (putting a "Custom" on the end), did you try to remove the "custom" part?

  • Hi M-W,

    1. Added a custom board in SysCfg

    2. Renamed the Callback funtion

    3. Build the project and observing the error

    ==================================================================================================================

    We  found the callback definition in the ti_drivers_config.c is not present and it automatically modifies the callback functions prototype to

    extern void rfDriverCallback(RF_Handle client, RF_GlobalEvent event, void* arg);

    To overcome this, we defined the  callback function in SimplePeripheral.c (earlier copied  the same callback's definition from ti_drivers_config.c) and that time we are able to build without error.

    After flashing, the BLE advertisement happens only for 3 seconds and stops.

    Thanks & Regards,

    Yasar Arafath

  • Hi M-W,

    1. Added a custom board in SysCfg

    2. Renamed the Callback funtion

    3. Build the project and observing the error

    ==================================================================================================================

    We  found the callback definition in the ti_drivers_config.c is not present and it automatically modifies the callback functions prototype to

    extern void rfDriverCallback(RF_Handle client, RF_GlobalEvent event, void* arg);

    To overcome this, we defined the  callback function in SimplePeripheral.c (earlier copied  the same callback's definition from ti_drivers_config.c) and this time we are able to build without error.

    After flashing, the BLE advertisement happens only for 3 seconds and stops.

    Thanks & Regards,

    Yasar Arafath

  • Hi Yasar,

    Can your share your definition of it? Also, what state is the application in when the device stops advertising (if you debug it)?

  • Hi M-W,

    Added the below snippet in SimplePeripheral.c

    ========================================

    #include "ti/drivers/pin/PINCC26XX.h"

    PIN_Handle frontendPins;
    PIN_State frontendState;

    void initRfFrontend_ud(void)
    {
    static bool initialized = false;

    if (!initialized) {
    PIN_Config frontendConfig[] = {
    CONFIG_RF_24GHZ | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Path disabled */
    CONFIG_RF_HIGH_PA | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Path disabled */
    CONFIG_RF_SUB1GHZ | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Path disabled */
    PIN_TERMINATE
    };
    frontendPins = PIN_open(&frontendState, frontendConfig);
    initialized = true;
    }
    }

    void rfDriverCallback(RF_Handle client, RF_GlobalEvent events, void *arg)
    {
    /* Local variable. */
    bool sub1GHz = false;
    uint8_t loDivider = 0;

    /* Initialize front-end (will only be done once) */
    initRfFrontend_ud();

    /* Switch off all paths first. Needs to be done anyway in every sub-case below. */
    PINCC26XX_setOutputValue(CONFIG_RF_24GHZ, 0);
    PINCC26XX_setOutputValue(CONFIG_RF_HIGH_PA, 0);
    PINCC26XX_setOutputValue(CONFIG_RF_SUB1GHZ, 0);

    if (events & RF_GlobalEventRadioSetup) {
    /* Decode the current PA configuration. */
    RF_TxPowerTable_PAType paType = (RF_TxPowerTable_PAType)RF_getTxPower(client).paType;

    /* Decode the generic argument as a setup command. */
    RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;

    switch (setupCommand->common.commandNo) {
    case (CMD_RADIO_SETUP):
    case (CMD_BLE5_RADIO_SETUP):
    loDivider = RF_LODIVIDER_MASK & setupCommand->common.loDivider;

    /* Sub-1GHz front-end. */
    if (loDivider != 0) {
    sub1GHz = true;
    }
    break;
    case (CMD_PROP_RADIO_DIV_SETUP):
    loDivider = RF_LODIVIDER_MASK & setupCommand->prop_div.loDivider;

    /* Sub-1GHz front-end. */
    if (loDivider != 0) {
    sub1GHz = true;
    }
    break;
    default:break;
    }

    if (sub1GHz) {
    /* Sub-1 GHz */
    if (paType == RF_TxPowerTable_HighPA) {
    /* PA enable --> HIGH PA
    * LNA enable --> Sub-1 GHz
    */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_24GHZ, PINCC26XX_MUX_GPIO);
    /* Note: RFC_GPO3 is a work-around because the RFC_GPO1 (PA enable signal) is sometimes not
    de-asserted on CC1352 Rev A. */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_HIGH_PA, PINCC26XX_MUX_RFC_GPO3);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_SUB1GHZ, PINCC26XX_MUX_RFC_GPO0);
    } else {
    /* RF core active --> Sub-1 GHz */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_24GHZ, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_HIGH_PA, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_SUB1GHZ, PINCC26XX_MUX_GPIO);
    PINCC26XX_setOutputValue(CONFIG_RF_SUB1GHZ, 1);
    }
    } else {
    /* 2.4 GHz */
    if (paType == RF_TxPowerTable_HighPA)
    {
    /* PA enable --> HIGH PA
    * LNA enable --> 2.4 GHz
    */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_24GHZ, PINCC26XX_MUX_RFC_GPO0);
    /* Note: RFC_GPO3 is a work-around because the RFC_GPO1 (PA enable signal) is sometimes not
    de-asserted on CC1352 Rev A. */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_HIGH_PA, PINCC26XX_MUX_RFC_GPO3);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_SUB1GHZ, PINCC26XX_MUX_GPIO);
    } else {
    /* RF core active --> 2.4 GHz */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_24GHZ, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_HIGH_PA, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_SUB1GHZ, PINCC26XX_MUX_GPIO);
    PINCC26XX_setOutputValue(CONFIG_RF_24GHZ, 1);
    }
    }
    } else {
    /* Reset the IO multiplexer to GPIO functionality */
    PINCC26XX_setMux(frontendPins, CONFIG_RF_24GHZ, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_HIGH_PA, PINCC26XX_MUX_GPIO);
    PINCC26XX_setMux(frontendPins, CONFIG_RF_SUB1GHZ, PINCC26XX_MUX_GPIO);
    }
    }

    Thanks & Regards,

    Yasar Arafath

  • Hi Yasar,

    Could you comment on the state of the application when "not running"?

  • HI M-W,

    PFA. Sorry, I missed that in my last reply.

    Thanks & Regards,

    Yasar Arafath

  • HI Yasar,

    Can't say for sure, but it looks like you might having an exception in hardware. Could you open up the Runtime Object View and try to check for exceptions (under the Hwi view) etc.?