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.

CC1312R: how to use CC1190 in customized board and SDK v7.x

Part Number: CC1312R
Other Parts Discussed in Thread: CC1310, CC1190, SYSCONFIG, CC1352P

Hi,

I am trying to migrate our CC1310 + CC1190 based board with firmware developed around SDK v4.x to CC1312R and SDK v7.x. After reading relevant posts on this forum, I come to the conclusion that this is doable and relatively straightforward. Because CC1312R is basically pin compatible with CC1310, only minor revisions are needed around crystal. On firmware side, we can start with the re-using tx power table for CC13-90 board. I have the following questions related to firmware development:

1) how do we re-use the TX power table? Should we stop generated source and replace the content of txPowerTable_868_pa13 with txPowerTable_subg_US_CC1310_CC1190 ?

In CC13-90/SDK v4.x, the following TX power table is used:

const macTxPwrVal_t txPowerTable_subg_US_CC1310_CC1190[] =
{
    {7, RF_TxPowerTable_DEFAULT_PA_ENTRY(0, 3, 0, 0) },
    {14, RF_TxPowerTable_DEFAULT_PA_ENTRY(1, 3, 0, 0) },
    {18, RF_TxPowerTable_DEFAULT_PA_ENTRY(2, 3, 0, 0) },
    {20, RF_TxPowerTable_DEFAULT_PA_ENTRY(3, 3, 0, 0) },
    {22, RF_TxPowerTable_DEFAULT_PA_ENTRY(4, 3, 0, 0) },
    {23, RF_TxPowerTable_DEFAULT_PA_ENTRY(5, 3, 0, 0) },
    {24, RF_TxPowerTable_DEFAULT_PA_ENTRY(6, 3, 0, 0) },
    {25, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 0) },
    {26, RF_TxPowerTable_DEFAULT_PA_ENTRY(14, 3, 0, 0) },
    RF_TxPowerTable_TERMINATION_ENTRY
};

In CC1312R/SDK v7.x based project, the following table is generated:

// generated source
// ti_radio_config.c

RF_TxPowerTable_Entry txPowerTable_868_pa13[TXPOWERTABLE_868_PA13_SIZE] =
{
    {-20, RF_TxPowerTable_DEFAULT_PA_ENTRY(0, 3, 0, 2) }, // 0x04C0
    {-15, RF_TxPowerTable_DEFAULT_PA_ENTRY(1, 3, 0, 3) }, // 0x06C1
    {-10, RF_TxPowerTable_DEFAULT_PA_ENTRY(2, 3, 0, 5) }, // 0x0AC2
    {-7, RF_TxPowerTable_DEFAULT_PA_ENTRY(3, 3, 0, 5) }, // 0x0AC3
    {-5, RF_TxPowerTable_DEFAULT_PA_ENTRY(4, 3, 0, 5) }, // 0x0AC4
    {-3, RF_TxPowerTable_DEFAULT_PA_ENTRY(5, 3, 0, 6) }, // 0x0CC5
    {0, RF_TxPowerTable_DEFAULT_PA_ENTRY(8, 3, 0, 8) }, // 0x10C8
    {1, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 9) }, // 0x12C9
    {2, RF_TxPowerTable_DEFAULT_PA_ENTRY(10, 3, 0, 9) }, // 0x12CA
    {3, RF_TxPowerTable_DEFAULT_PA_ENTRY(11, 3, 0, 10) }, // 0x14CB
    {4, RF_TxPowerTable_DEFAULT_PA_ENTRY(13, 3, 0, 11) }, // 0x16CD
    {5, RF_TxPowerTable_DEFAULT_PA_ENTRY(14, 3, 0, 14) }, // 0x1CCE
    {6, RF_TxPowerTable_DEFAULT_PA_ENTRY(17, 3, 0, 16) }, // 0x20D1
    {7, RF_TxPowerTable_DEFAULT_PA_ENTRY(20, 3, 0, 19) }, // 0x26D4
    {8, RF_TxPowerTable_DEFAULT_PA_ENTRY(24, 3, 0, 22) }, // 0x2CD8
    {9, RF_TxPowerTable_DEFAULT_PA_ENTRY(28, 3, 0, 31) }, // 0x3EDC
    {10, RF_TxPowerTable_DEFAULT_PA_ENTRY(18, 2, 0, 31) }, // 0x3E92
    {11, RF_TxPowerTable_DEFAULT_PA_ENTRY(26, 2, 0, 51) }, // 0x669A
    {12, RF_TxPowerTable_DEFAULT_PA_ENTRY(16, 0, 0, 82) }, // 0xA410
    // The original PA value (12.5 dBm) has been rounded to an integer value.
    {13, RF_TxPowerTable_DEFAULT_PA_ENTRY(36, 0, 0, 89) }, // 0xB224
    // This setting requires CCFG_FORCE_VDDR_HH = 1.
    {14, RF_TxPowerTable_DEFAULT_PA_ENTRY(63, 0, 1, 0) }, // 0x013F
    RF_TxPowerTable_TERMINATION_ENTRY
};

2) How do we initialize CC1190?

In CC13-90/SDK v4.x based project, the following code are used to initialize PA/LNA

void Board_Palna_initialize(uint32_t hgm)
{
    if (hgm)
    {
        if (!palnaPinHandle)
        {
            /* Open PA/LNA PIN driver */
            palnaPinHandle = PIN_open(&palnaPinState, palnaPinTable);

            /* Set IO muxing for RFC GPOs */
            PINCC26XX_setMux(palnaPinHandle, Board_PALNA_LNA, IOC_PORT_RFC_GPO0);
            PINCC26XX_setMux(palnaPinHandle, Board_PALNA_PA, IOC_PORT_RFC_GPO1);
        }

        PIN_setOutputValue(palnaPinHandle, Board_PALNA_HGM, (hgm & 1));

    }
}

// main.c
macUser0Cfg[0].pSetRE = Board_Palna_initialize;

// ssf.c/csf.c
/* Initialize PA/LNA if enabled */
ApiMac_mlmeSetReqUint8(ApiMac_attribute_rangeExtender, (uint8_t)CONFIG_RANGE_EXT_MODE);

In CC1312R/SDK v7.x based project, setRangeExtenderFp_t is no longer a member of macUserCfg_t:

typedef struct
{
    uint32_t               getHwRevision;     /* API to get HW revision */
    uint32_t               *pRfDrvTblPtr;     /* RF Driver API table */
    uint32_t               *pCryptoDrvTblPtr; /* Crypto Driver API table */
    alternateHalAssertFp_t pAssertFP;         /* Assert Function Pointer */
    rfSelectFp_t           pRfSelectFP;       /* RF select Function Pointer */
} macUserCfg_t;

Does that mean we need to just call up GPIO functions to set pins that control CC1190 to desired level in main?

Please advise and thanks.

ZL

  • First of al, if you are porting an application from CC1310 to CC1312R, the first thing you need to do is to download the latest SDK for the CC1312R, and start off with one of the default example projects for the CC1312R. Do not take your existing CC1310 project and try to change that to run on the CC1312R.

    You need to configure the GPIOs you want to use for the LNA and PA signal using SysConfig:

      

    In your application code, you can route the LNA signal and PA signal from the RF Core to the GPIOs like this:

    int main(void)
    {
        pthread_t           thread;
        pthread_attr_t      attrs;
        struct sched_param  priParam;
        int                 retc;
        int                 detachState;
    
        /* Call driver init functions */
        Board_initGeneral();
        GPIO_init(); // Init the GPIO driver
        .
        .
        .
    }
    
    void *mainThread(void *arg0)
    {
        GPIO_setConfig(CONFIG_GPIO_LNA, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
        GPIO_setConfig(CONFIG_GPIO_PA,  GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
    
        GPIO_write(CONFIG_GPIO_LNA, 0);
        GPIO_write(CONFIG_GPIO_PA,  0);
    
        // Route out LNA active pin to CONFIG_GPIO_LNA
        GPIO_setConfigAndMux(CONFIG_GPIO_LNA, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW, IOC_PORT_RFC_GPO0);
        
        // Route out PA active pin to CONFIG_GPIO_PA
        GPIO_setConfigAndMux(CONFIG_GPIO_PA, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW, IOC_PORT_RFC_GPO1);
        .
        .
        .
        

    I will have someone from our RF team comment on what values you should use for the PA table.

    If the default values from SmartRF Studio needs to be modified, you should take the SysConfig generated file ti_radio_config.c, and add it manually to your project and do the necessary modifications.

    In SysConfig, you then need to exclude the file from the build:

    BR

    Siri

  • Hi ZL,

    As per https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/899330/cc1312r-using-cc1190-with-cc1312 and https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/919953/cc1312r-custom-board-with-the-amplifier-cc1190 you can start with txPowerTable_subg_US_CC1310_CC1190 (the PA is similar in both devices).

    Note that the input of the CC1190 should not exceed +10 dBm, so the CC1312R output should not be set to more than +12 dBm (probably less to be conservative). If possible, measuring the output power of the CC1312R with txPowerTable_subg_US_CC1310_CC1190 to check would be recommended as the CC1312R has not been tested with the CC1190 (as the CC1352P includes a +20 dBm PA). This would ensure that the CC1312R's input power (to the CC1190) is maximised but also not exceeding the CC1190 maximum input power.

    Regards,

    Zack

  • Hi Zack,

    Could you clarify if we can simply replace the content of tx power table for CC1312R+CC1190 with the one from CC1310+CC1190? and make it look like something like the following?

    // generated source
    // ti_radio_config.c
    // replaced with table from SDK v4.x, CC1310+CC1190
    RF_TxPowerTable_Entry txPowerTable_868_pa13[] =
    {
        {7, RF_TxPowerTable_DEFAULT_PA_ENTRY(0, 3, 0, 0) },
        {14, RF_TxPowerTable_DEFAULT_PA_ENTRY(1, 3, 0, 0) },
        {18, RF_TxPowerTable_DEFAULT_PA_ENTRY(2, 3, 0, 0) },
        {20, RF_TxPowerTable_DEFAULT_PA_ENTRY(3, 3, 0, 0) },
        {22, RF_TxPowerTable_DEFAULT_PA_ENTRY(4, 3, 0, 0) },
        {23, RF_TxPowerTable_DEFAULT_PA_ENTRY(5, 3, 0, 0) },
        {24, RF_TxPowerTable_DEFAULT_PA_ENTRY(6, 3, 0, 0) },
        {25, RF_TxPowerTable_DEFAULT_PA_ENTRY(9, 3, 0, 0) },
        {26, RF_TxPowerTable_DEFAULT_PA_ENTRY(14, 3, 0, 0) },
        RF_TxPowerTable_TERMINATION_ENTRY
    };

    Thanks,

    ZL

  • Hi ZL,

    I am double-checking this with our SW Apps team - I will need to get back to you early next week with a follow-up answer.

    Regards,

    Zack