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.

CC1352R1- I@C pin confiration not working while defined inside code

Part Number: CC1352R
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I tried to configure I2C pins for my external device interface, It worked only when configure on sysconfig file, I need to configure via board.c file,

here I attached some screenshot, What went wrong and How to configure by code?

Thanks,

Titus

#include <ti/drivers/I2C.h>
#include <ti/drivers/i2c/I2CCC26XX.h>

I2CCC26XX_Object i2cCC26xxObjects[CC1352P1_LAUNCHXL_I2CCOUNT];

const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC1352P1_LAUNCHXL_I2CCOUNT] = {
    {
        .baseAddr    = I2C0_BASE,
        .powerMngrId = PowerCC26XX_PERIPH_I2C0,
        .intNum      = INT_I2C_IRQ,
        .intPriority = ~0,
        .swiPriority = 0,
        .sdaPin      = IOID_26,
        .sclPin      = IOID_27,
    }
};

const I2C_Config I2C_config[CC1352P1_LAUNCHXL_I2CCOUNT] = {
    {
        //.fxnTablePtr = &I2CCC26XX_fxnTable,
        .object      = &i2cCC26xxObjects[CC1352P1_LAUNCHXL_I2C0],
        .hwAttrs     = &i2cCC26xxHWAttrs[CC1352P1_LAUNCHXL_I2C0]
    },
};

const uint_least8_t I2C_count = CC1352P1_LAUNCHXL_I2CCOUNT;

  • Hi Titus, 

    Sysconfig is provided for this purpose. It is the recommended method to setup the drivers and peripherals. 

    But if you want to take a look at the structures generated by sysconfig, you can see it in the generated code view. 

    These structures are defined in ti_drivers_config files. 

    You can take a look at this and make your own changes. But it is not the recommended approach to manually modify board files from the SDK.

    Regards,
    Sid